What is the output of the program given below

#include<stdio.h>
main()
{
char i=0;
for(;i>=0;i++) ;
printf("%d\n",i);
}

Answers were Sorted based on User's Feedback



What is the output of the program given below #include<stdio.h> main() { ..

Answer / madhu

127.As i is a char the last digit would be 127,so the loop
stops at that point.
I crosschecked it writing a program.

Is This Answer Correct ?    1 Yes 9 No

Post New Answer

More C Interview Questions

What are the advantages and disadvantages of a heap?

0 Answers  


Write a program that accept anumber in words

0 Answers  


How can I call a function, given its name as a string?

4 Answers   ABC Telecom,


Write a program to print numbers from 1 to 100 without using loop in c?

0 Answers  


to get a line of text and count the number of vowels in it

3 Answers   Satyam,






why in C,C++'s int size is 2 byte and .net(c#) int Size is 4 byte?

2 Answers  


In C programming, how do you insert quote characters (‘ and “) into the output screen?

0 Answers  


What are preprocessor directives in c?

0 Answers  


What is boolean in c?

0 Answers  


What is structure of c program?

0 Answers  


What is string in c language?

0 Answers  


Write a program to generate prime factors of a given integer?

2 Answers  


Categories