main()

{

int i=0;

for(;i++;printf("%d",i)) ;

printf("%d",i);

}



main() { int i=0; for(;i++;printf("%d",i)) ; printf(&q..

Answer / susie

Answer :

1

Explanation:

before entering into the for loop the checking condition is
"evaluated". Here it evaluates to 0 (false) and comes out of
the loop, and i is incremented (note the semicolon after the
for loop).

Is This Answer Correct ?    25 Yes 9 No

Post New Answer

More C Code Interview Questions

#include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int i) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } the answer is 0 1 2 0..someone explain how the code is executed..?

1 Answers   Wipro,


how to delete an element in an array

2 Answers   IBM,


String copy logic in one line.

11 Answers   Microsoft, NetApp,


Is the following code legal? struct a { int x; struct a *b; }

2 Answers  


main() { int i=_l_abc(10); printf("%d\n",--i); } int _l_abc(int i) { return(i++); }

2 Answers  






main( ) { void *vp; char ch = ‘g’, *cp = “goofy”; int j = 20; vp = &ch; printf(“%c”, *(char *)vp); vp = &j; printf(“%d”,*(int *)vp); vp = cp; printf(“%s”,(char *)vp + 3); }

1 Answers  


Write a routine that prints out a 2-D array in spiral order

3 Answers   Microsoft,


char *someFun() { char *temp = “string constant"; return temp; } int main() { puts(someFun()); }

1 Answers  


programming in c lanugaue programm will errror error with two header file one as stdio.h and other one is conio.h

1 Answers  


write a c program to print magic square of order n when n>3 and n is odd?

1 Answers   HCL,


main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

1 Answers  


#include<stdio.h> main() { FILE *ptr; char i; ptr=fopen("zzz.c","r"); while((i=fgetch(ptr))!=EOF) printf("%c",i); }

1 Answers  


Categories