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

Answers were Sorted based on User's Feedback



int i; main(){ int t; for ( t=4;scanf("%d",&i)-t;printf(..

Answer / sandeep

answer :

4--0
3--1
2--2

Is This Answer Correct ?    13 Yes 5 No

int i; main(){ int t; for ( t=4;scanf("%d",&i)-t;printf(..

Answer / susie

Answer :

4--0

3--1

2--2

Explanation:

Let us assume some x= scanf("%d",&i)-t the values
during execution

will be,

t i x

4 0 -4

3 1 -2

2 2 0

Is This Answer Correct ?    5 Yes 5 No

Post New Answer

More C Code Interview Questions

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

2 Answers  


void main() { static int i=i++, j=j++, k=k++; printf(“i = %d j = %d k = %d”, i, j, k); }

3 Answers  


#define clrscr() 100 main() { clrscr(); printf("%d\n",clrscr()); }

2 Answers  


main() { int i; i = abc(); printf("%d",i); } abc() { _AX = 1000; }

2 Answers  


x=2 y=3 z=2 x++ + y++; printf("%d%d" x,y);

2 Answers  






main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }

1 Answers  


main() { static int a[3][3]={1,2,3,4,5,6,7,8,9}; int i,j; static *p[]={a,a+1,a+2}; for(i=0;i<3;i++) { for(j=0;j<3;j++) printf("%d\t%d\t%d\t%d\n",*(*(p+i)+j), *(*(j+p)+i),*(*(i+p)+j),*(*(p+j)+i)); } }

1 Answers  


WAP to display 1,2,3,4,5........N

2 Answers  


All the combinations of prime numbers whose sum gives 32

1 Answers   HHH,


could you please send the program code for multiplying sparse matrix in c????

0 Answers  


union u { struct st { int i : 4; int j : 4; int k : 4; int l; }st; int i; }u; main() { u.i = 100; printf("%d, %d, %d",u.i, u.st.i, u.st.l); } a. 4, 4, 0 b. 0, 0, 0 c. 100, 4, 0 d. 40, 4, 0

1 Answers   HCL,


main() { if (!(1&&0)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above

3 Answers   HCL,


Categories