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

A stack can be implemented only using array?if not what is used?

3 Answers   InterGlobal,


What is nested structure?

0 Answers  


If we have an array of Interger values, find out a sub array which has a maximum value of the array and start and end positions of the array..The sub array must be contiguious. Take the start add to be 4000. For Ex if we have an array arr[] = {-1,-2,-5,9,4,3,-6,8,7,6,5,-3} here the sub array of max would be {8,7,6,5} coz the sum of max contiguous array is 8+7+6+5 = 26.The start and end position is 4014(8) and 4020(5).

5 Answers   Microsoft, Motorola,


What is wild pointer in c with example?

0 Answers  


How do i store a paragraph into a string? for example, if i input a long paragraph, the program will read the words one by one and concatenate them until no word is left.

1 Answers  


What is the meaning of c in c language?

0 Answers  


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

0 Answers   Amazon,


Convert the following expression to postfix and prefix (A+B) * (D-C)

3 Answers   Satyam,


Find greatest of two numbers using macro

4 Answers   Bosch, Siemens,


HOW TO HANDLE EXCEPTIONS IN C

8 Answers  


In which category does main function belong??

5 Answers  


Define VARIABLE?

0 Answers   ADP,


Categories