- #1
jd12345
- 256
- 2
Ok so I was trying something in C when i found something i don't understand:-
code is:-
int c = 1;
printf("%c\n",c);
(not writing the include and return 0 stuff)
so when i run this it gives an output of a 2x2 box like this:-
0 0
0 1
whats happening. When i put the 1 in commas like this int c= '1' then it gives an ouput 1. Thats good but when i don't put the comma it gives this box, why?
code is:-
int c = 1;
printf("%c\n",c);
(not writing the include and return 0 stuff)
so when i run this it gives an output of a 2x2 box like this:-
0 0
0 1
whats happening. When i put the 1 in commas like this int c= '1' then it gives an ouput 1. Thats good but when i don't put the comma it gives this box, why?