i have program which prints all char from char_min to char_max here is code
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
int main(){
char c;
c=CHAR_MIN;
while(c!=CHAR_MAX){
printf("d\n",c);
c=c+1;
}
return 0;
}
but it prints only all d why?ouput is like this
d
d
d
d
d
d
d
d
d
d
…
.
. press any key to continue
Using “%d” will just print “0”, “1”, “2” etc.
Using “%c” will print the character values: “A”, “B”, “C” etc. Note, however, that the first 31 aren’t printable.