int i =10
main()
{
int i =20,n;
for(n=0;n<=i;)
{
int i=10
i++;
}
printf("%d", i);

Answers were Sorted based on User's Feedback



int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d&quo..

Answer / jai

printf() will never be executed since for() is an infinite
loop.

Is This Answer Correct ?    30 Yes 2 No

int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d&quo..

Answer / vikramanj

int i=10[;]
main()
{
int i=20,n;
for(n=0;n<=i;)
{
int i=10[;]
i++;
}
printf("%d", i);
The syntax errs r specified in sq.braces..
if its corrected there s no terminating condition also..
so no o/p..

Is This Answer Correct ?    8 Yes 0 No

int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d&quo..

Answer / vignesh1988i

it will not print i value at all , since the loop is always
true for all cases. since the termination condition is
depending upon n&i,always n<=i, what ever possibe positive
value greater than zero ,it may be.

Is This Answer Correct ?    5 Yes 0 No

int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d&quo..

Answer / dips

it doesnt have any terminating condition so it will be
infinite loop ,no output

Is This Answer Correct ?    4 Yes 0 No

int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d&quo..

Answer / guest

the print would be 20.

the problem is about scope. the first i=10 is global scope.
But inside main() comes function scope. So i=20. The i
inside the for loop is of block scope and does not affect
the i outside it.

Is This Answer Correct ?    5 Yes 9 No

int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d&quo..

Answer / guest

i=20

Is This Answer Correct ?    2 Yes 10 No

Post New Answer

More C Interview Questions

how to exchnage bits in a byte b7<-->b0 b6<-->b1 b5<-->b2 b4<-->b3 please mail me the code if any one know to rajeshmb4u@gmail.com

3 Answers   Honeywell, Huawei,


why integer range between -327680to+32767

2 Answers  


What does void main () mean?

0 Answers  


What is scope rule in c?

0 Answers  


enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }

4 Answers   ME,






which types of data structure will i use to convert infix to post fix???

5 Answers   IIT,


Do you know what are the properties of union in c?

0 Answers  


Explain why c is faster than c++?

0 Answers  


please can some one guide me, to the answer Write a C program to enter 15 numbers as an input from the keyboard and program will find and print odd numbers and their average. i have studied while and do while loop for loop if and else if switch

2 Answers  


what is the role you expect in software industry?

0 Answers   HCL,


Explain what is a static function?

0 Answers  


write a program in c language to print your bio-data on the screen by using functions.

6 Answers   College School Exams Tests, IBM,


Categories