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 |
Can you please explain the difference between malloc() and calloc() function?
write a program to display the frequency of each element in a given array in c language
What is the output of the program given below #include<stdio.h> main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
21 Answers ADITI, Student, TCS,
the data type used for unlimited value in c and how to do this program
why we shiuld use main keyword in C
wat is the meaning of c?
how to reverse string "Hello World" by using pointers only. Without any temp var
Explain modulus operator.
How can you call a function, given its name as a string?
main() { int a=4,b=2; a=b<<a + b>>2; printf("%d", a); }
11 Answers HCL, Vector, Vector India, Vector Solutions, Wipro,
Is there any restriction in how many arguments printf or scanf function can take? in which file in my c++ compiler i can see the code for implementation of these two functions??
hello friends what do u mean by BUS ERROR i got this error while i am doing my program in DATA STRUCTURES