main()

{

int i=0;

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

printf("%d",i);

}

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

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 ? 19 Yes 7 No

More C Code Interview Questions

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

int i; main(){ int t; for ( t=4;scanf("%d",&i)-t;printf("%d\n",i)) printf("%d--",t--); } // If the inputs are 0,1,2,3 find the o/p

how to return a multiple value from a function?

main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }

void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }

How can i find first 5 natural Numbers without using any loop in c language????????

3) Int Matrix of certain size was given, We had few valu= es in it like this. =97=97=97=97=97=97=97=97=97=97=97 1 = | 4 | | 5 | &= nbsp; | 45 =97=97=97=97=97=97=97=97=97=97=97 &n= bsp; | 3 | 3 | 5 | = | 4 =97=97=97=97=97=97=97=97=97=97=97 34 |&nbs= p; 3 | 3 | | 12 | &= nbsp; =97=97=97=97=97=97=97=97=97=97=97 3 | &nbs= p; | 3 | 4 | = | 3 =97=97=97=97=97=97=97=97=97=97=97 3 | = ; | | | = ; 3 | =97=97=97=97=97=97=97=97=97=97=97 &= nbsp; | | 4 | = ; | 4 | 3 We w= ere supposed to move back all the spaces in it at the end. Note: = If implemented this prog using recursion, would get higher preference.

void ( * abc( int, void ( *def) () ) ) ();

main( ) { int a[ ] = {10,20,30,40,50},j,*p; for(j=0; j<5; j++) { printf(ā%dā ,*a); a++; } p = a; for(j=0; j<5; j++) { printf(ā%d ā ,*p); p++; } }

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

PROG. TO PRODUCE 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1

main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }

Categories