for(i=1;i>0;i++);
printf("i=%d",i);
what will be the answer????

Answer Posted / ankit shekhavat

after for lop,there is a semicolon.it means loop terminate
here..condition inside the loop will always true.so it will
be an infinite loop..nothing will be printed on the screen.
for next statement there will be printed any garbage value...

Is This Answer Correct ?    7 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When is the “void” keyword used in a function?

847


What is an example of structure?

591


Describe newline escape sequence with a sample program?

662


What is an endless loop?

806


What is structure in c explain with example?

645






Explain how can you check to see whether a symbol is defined?

665


Do you know the use of 'auto' keyword?

666


What is string function in c?

544


write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3

1646


Explain how are portions of a program disabled in demo versions?

659


When should a type cast be used?

578


What is the use of getchar functions?

683


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

1797


Can an array be an Ivalue?

669


How can I get back to the interactive keyboard if stdin is redirected?

674