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
Answer Posted / c.p.senthil
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 |
Post New Answer View All Answers
Explain what is the concatenation operator?
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
What is the main difference between calloc () and malloc ()?
Explain b+ tree?
How can I call fortran?
What are the properties of union in c?
What is variables in c?
Explain what is the heap?
Write a C program in Fibonacci series.
What language is lisp written in?
Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays
Tell me when is a void pointer used?
How can I sort a linked list?
What is calloc malloc realloc in c?
What is variable in c example?