Well, not using language facilities will make your life only harder. Also if you want to change the number of digits that will be printed you will need to modify the code and add/remove nested loops.
To the point... You can use nested loops to find all the possible ways these four digits can be ordered (duplicate digits allowed) and then remove those in which a digit is found more than once. So that you get your permutations. It is a blunt solution, but it works. The code could be something like this for the case of 1,2,3 and 4.
#include <stdio.h>
int main(int argc, char** argv){
int a,b,c,d;
for(a=1; a<5; a++){
for(b=1; b<5; b++){
for(c=1; c<5; c++){
for(d=1; d<5; d++){
if(!(a==b || a==c || a==d || b==c || b==d || c==d))
printf("%d%d%d%d\n",a,b,c,d);
}
}
}
}
return 0;
}