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
How do you use a 'Local Block'?
Explain what are reserved words?
Explain why c is faster than c++?
Explain what are preprocessor directives?
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
Why does notstrcat(string, "!");Work?
What are the types of macro formats?
What is pass by value in c?
Explain how can I make sure that my program is the only one accessing a file?
What language is windows 1.0 written?
Why we use conio h in c?
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
What does the c in ctime mean?
I need previous papers of CSC.......plz help out by posting them.......