This is my code the problem is when it prints a number the number appears very strange in the right bottom corner of a square with the 3 other corners being 0.My code is using a function's file(this one) a header file and a main.c file.I'm calling this function in the main.c file with the unsigned int a read from the keyboard.
Code:#include<stdio.h> #include"L5P21.h" //that's my header void conversion(unsigned int a,char c[]) { unsigned int i=1,d,remainder,m,j; while(a!=0) { remainder=a%16; c[i]=remainder; m=10; for(d=0;d<5;d++) { if(c[i]==m) { c[i]='A'+d; } m++; } i++; } printf("0X"); for(j=i-1;j>0;j--) { printf("%c",c[j]); } }