int main()
{
unsigned char a = 0;
do {
printf("%d=%c\n",a,a);
a++;
}while(a!=0);
return 0;
} can anyone please explain me output????



int main() { unsigned char a = 0; do { printf("%d=%c\n",a,a); a++; }while(a!=0); r..

Answer / senthilkumar

unsigned char range 0-255. So.. this program prints 0-255 and also equivalent ascii character. ..program is exit after 255...becz after 255 'a' become 0.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

How can I avoid the abort, retry, fail messages?

0 Answers  


main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }

9 Answers   TCS,


What are types of structure?

0 Answers  


Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.

0 Answers  


4)What would be the output? main() { int num=425; pf("%d",pf("%d",num)); } a)Comp error b)4425 c)4253 d)3435 e)none

10 Answers  


what is d pitfalls of registers variables

3 Answers   TCS,


What is meant by int fun const(int a, int b) { .... ... }

1 Answers  


How important is structure in life?

0 Answers  


What is nested structure?

0 Answers  


What is the use of linkage in c language?

0 Answers  


Write a program that an operator and two operands read from input operand operator on the implementation and results display.

0 Answers  


What is a structure member in c?

0 Answers  


Categories