main()

{

int i =0;j=0;

if(i && j++)

printf("%d..%d",i++,j);

printf("%d..%d,i,j);

}



main() { int i =0;j=0; if(i && j++) printf("%..

Answer / susie

Answer :

0..0

Explanation:

The value of i is 0. Since this information is enough to
determine the truth value of the boolean expression. So the
statement following the if statement is not executed. The
values of i and j remain unchanged and get printed.

Is This Answer Correct ?    13 Yes 7 No

Post New Answer

More C Code Interview Questions

#define a 10 void foo() { #undef a #define a 50 } int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } explain the answer

1 Answers  


main() { char *p; p="Hello"; printf("%c\n",*&*p); }

1 Answers  


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

1 Answers  


void main() { int *mptr, *cptr; mptr = (int*)malloc(sizeof(int)); printf(ā€œ%dā€,*mptr); int *cptr = (int*)calloc(sizeof(int),1); printf(ā€œ%dā€,*cptr); }

1 Answers  


¦void main() ¦{ ¦int i=10,j; ¦ j=i+++i+++i; ¦printf("%d",j); ¦getch(); ¦} ¦ output:-30 but in same question if we write as- ¦void main() ¦{ ¦int i=10; ¦ int j=i+++i+++i; ¦printf("%d",j); ¦getch(); ¦} ¦ output:-33 why output is changed from 30 to 33. Can any body answer...

3 Answers  






how to test pierrot divisor

0 Answers  


void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }

3 Answers  


how to check whether a linked list is circular.

11 Answers   Microsoft,


What is the output of the program given below main() { signed char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

1 Answers  


String reverse with time complexity of n/2 with out using temporary variable.

10 Answers   NetApp, Symantec,


‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }

2 Answers  


main() { int x=5; for(;x!=0;x--) { printf("x=%d\n", x--); } } a. 5, 4, 3, 2,1 b. 4, 3, 2, 1, 0 c. 5, 3, 1 d. none of the above

2 Answers   HCL,


Categories