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

Which of the following about automatic variables within a function is correct ? a.its type must be declared before using the variable b.they are local c.they are not initialised to zero d.they are global.

6 Answers   FCI, TCS,


2. Write a function called hms_to_secs() that takes three int values&#8212;for hours, minutes, and seconds&#8212;as arguments, and returns the equivalent time in seconds.. Create a program that exercises this function by repeatedly obtaining a time value in hours, minutes, and seconds from the user (format 12:59:59), calling the function, and displaying the value of seconds it returns.

5 Answers   TCS,


The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.

0 Answers   Microsoft,


What is the use of header files?

0 Answers  


1. Write the function int countchtr(char string[ ], int ch); which returns the number of times the character ch appears in the string. Example, the call countchtr(“She lives in NEWYORK”, ‘e’) would return 3.

4 Answers  






Can we include one C program into another C program if yes how?

7 Answers   Infosys,


What do you mean by team??

5 Answers   Student,


what is a NULL Pointer? Whether it is same as an uninitialized pointer?

0 Answers   TISL,


program to find a smallest number in an array

15 Answers   Microsoft, Sony,


why little endian and big endian came?y they using differently? y they not used commonly ?wt is application of little and big ?

1 Answers  


which is the best antivirus and how to update it

7 Answers   Infosys,


write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a<b,printb.find the sum digits of that number & then print.if a==b multiply 10 with a & add 20 with b store in c and then print

0 Answers  


Categories