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
What is static and volatile in c?
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
Wt are the Buses in C Language
What does int main () mean?
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above
Is there a built-in function in C that can be used for sorting data?
What are variables and it what way is it different from constants?
Explain how can you be sure that a program follows the ansi c standard?
How do you list files in a directory?
Explain that why C is procedural?
Is c dynamically typed?
Can one function call another?
When should a far pointer be used?