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 |
How can this be legal c?
C passes By value or By reference?
5 Answers Geometric Software, Infosys,
main() { float f1=10.5; double db1=10.5 if(f1==db1) printf("a"); else printf("b") }
main() {int i=5; // line 1 i=(++i)/(i++); // line 2 printf("%d",i); // line 3 } output is 2 but if we replace line 2 and line 3 by printf("%d",i=(++i)/(i++)); then output is 1. Why?
what is object oriental programing?
If the size of int data type is two bytes, what is the range of signed int data type?
how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?
what do structure language means?
How will you allocate memory to a double pointer ?
WHAT IS LOW LEVEL 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,
what is bit rate & baud rate? plz give wave forms