what will be the output of this program
main()
{
int i=1;
while (i<=10);
{
i++;
}
}

Answers were Sorted based on User's Feedback



what will be the output of this program main() { int i=1; while (i<=10); { i++; } } ..

Answer / durgesh

Infinite Loop...

Is This Answer Correct ?    6 Yes 1 No

what will be the output of this program main() { int i=1; while (i<=10); { i++; } } ..

Answer / pervinder sing dinghra

infine loop

Is This Answer Correct ?    4 Yes 1 No

what will be the output of this program main() { int i=1; while (i<=10); { i++; } } ..

Answer / sanjiv

11

Is This Answer Correct ?    3 Yes 2 No

what will be the output of this program main() { int i=1; while (i<=10); { i++; } } ..

Answer / srikanth karnati

there is no output because there is no out statment
there.if write printf("%d",i);at out side the loop the
output will be 11.

Is This Answer Correct ?    2 Yes 1 No

what will be the output of this program main() { int i=1; while (i<=10); { i++; } } ..

Answer / harun

11

Is This Answer Correct ?    1 Yes 1 No

what will be the output of this program main() { int i=1; while (i<=10); { i++; } } ..

Answer / shanmuga priya

10

Is This Answer Correct ?    0 Yes 0 No

what will be the output of this program main() { int i=1; while (i<=10); { i++; } } ..

Answer / dharmendra kumar

It occurs a run time error function should return type.
If return type mentioned, after that nothing will print too, and loop will started infinite.

Is This Answer Correct ?    0 Yes 0 No

what will be the output of this program main() { int i=1; while (i<=10); { i++; } } ..

Answer / niranjan kumar niraj

output is 1

Is This Answer Correct ?    1 Yes 2 No

what will be the output of this program main() { int i=1; while (i<=10); { i++; } } ..

Answer / aswini

answer will be 10.it will never execute the loop as there
is semicolon.hence directly 10 will be assigned to i.

Is This Answer Correct ?    1 Yes 3 No

what will be the output of this program main() { int i=1; while (i<=10); { i++; } } ..

Answer / prashanthi

2

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Interview Questions

while running a program, i got the msg that press return key to exit.what that mean in C as there are no such options as far i know.

1 Answers   TCS,


What is the use of c language in real life?

0 Answers  


please send me the code for multiplying sparse matrix using c

0 Answers  


what is out put of the following code? #include class Base { Base() { cout<<"constructor base"; } ~Base() { cout<<"destructor base"; } } class Derived:public Base { Derived() { cout<<"constructor derived"; } ~Derived() { cout<<"destructor derived"; } } void main() { Base *var=new Derived(); delete var; }

3 Answers   Honeywell,


What is a program flowchart?

0 Answers  






What is double pointer in c?

0 Answers  


c language interview questions & answer

0 Answers  


What is the difference between NULL and NUL?

0 Answers   Aspire, Infogain,


differentiate between const char *a; char *const a; and char const *a;

2 Answers   College School Exams Tests, HCL, TCS,


What is meant by recursion?

0 Answers   ADP,


how can i get the output 54321 4321 321 21 1 in c programming........???? pls help......

10 Answers   Infosys,


What is your stream meaning?

0 Answers  


Categories