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 |
Explain the advantages of using macro in c language?
What are pointers? What are different types of pointers?
What is maximum size of array in c?
What is time complexity c?
What are the restrictions of a modulus operator?
how to reverse string "Hello World" by using pointers only. Without any temp var
what will be the output of "printf("%d%d",scanf("%d% d",&a,&b))".provide an explation regarding the question
What is graph in c?
What are the loops in c?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
void main() { //char ch; unsigned char ch; clrscr(); for(ch =0;ch<= 127; ch++) printf(" %c= %d \t ", ch, ch); } output?
What are multidimensional arrays?