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 / vennila

*
**
***
****

Is This Answer Correct ?    0 Yes 0 No

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

Answer / gautam

0 to 127

Is This Answer Correct ?    5 Yes 6 No

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

Answer / mohmedali

0

Is This Answer Correct ?    4 Yes 6 No

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

Answer / rajendra.p (honeywell)

-128 is correct answer

Is This Answer Correct ?    2 Yes 4 No

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

Answer / sakthi

the function should not return any value.
or
-113

Is This Answer Correct ?    1 Yes 3 No

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

Answer / tasneemuddin

It will print no from 0 to 32767.
Like :
0
1
2
3
.
.
.
.
32767

Is This Answer Correct ?    3 Yes 6 No

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

Answer / mohmedali

garbage values

Is This Answer Correct ?    1 Yes 7 No

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

Answer / deepanjali

infinte loop

Is This Answer Correct ?    4 Yes 10 No

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

Answer / mohmedali

1

Is This Answer Correct ?    1 Yes 8 No

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

Answer / ananth

The loop never gets terminated as it runs infinite. So the
printf statement will not trigger & no o/p is produced.

Is This Answer Correct ?    11 Yes 19 No

Post New Answer

More C Interview Questions

write a program that accepts 3 numbers from the user. dispaly the values in a descending order.

3 Answers  


Why c language is called c?

0 Answers  


main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }

4 Answers  


#include<stdio.h> int main() { int i=0,j=1,k=2,m,n=0; m=i++&&j++&&k++||n++; printf("%d,%d,%d,%d,%d",i,j,k,m,n); }

12 Answers   Capital IQ, Sasken,


how to multiply two number taking input as a string (considering sum and carry )

2 Answers   Wipro,


Why C language is a procedural language?

0 Answers   Ericsson,


Q.11 Generate the following pattern using code in any language(c/c++/java) for n no. of rows 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1

2 Answers  


What are the rules for identifiers in c?

0 Answers  


Write a C function to search a number in the given list of numbers. donot use printf and scanf

6 Answers   Honeywell, TCS,


What is wrong with this program statement?

0 Answers  


Is main a keyword in c?

0 Answers  


how to write a c program to print list of fruits in alpabetical order?

0 Answers  


Categories