1) int main() {
unsigned char a = 0;
do {
printf("%d=%c\n",a,a);
a++;
}while(a!=0);
return 0;
}
can anyone please explain the explain the output
Answers were Sorted based on User's Feedback
ANS: Prints all the ascii characters from 0 to 255 in the below format
0=
1=☺
2=☻
3=♥
4=♦
5=♣
6=♠
.
.
.
251=√
252=ⁿ
253=²
254=■
255=
'a' is a unsigned char variable, size = 8 bits
so the maximum value 'a' can store is 255.
an increment from 'a' value 255 will cause overflow and
'a' value becomes 0, when the loop terminates.
| Is This Answer Correct ? | 4 Yes | 0 No |
What is function pointer c?
What is null in c?
FILE PROGRAMMING
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
what is the difference between exit() and _exit() functions?
what different between c and c++
in iso what are the common technological language?
is forign key will be unique key any table or not?
how do we remove the printed character in printf statement and write next it it
Can you return null in c?
program for following output using for loop? 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
what is the purpose of the code, and is there any problem with the code? int f( int n, int l, int r ) { return (n << l) >> r; }