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

Answers were Sorted based on User's Feedback



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

Answer / jack

4

Is This Answer Correct ?    4 Yes 3 No

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

Answer / sanjay bk

8400,8521, when you run program then program giving output is different different answer.

Is This Answer Correct ?    2 Yes 2 No

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

Answer / govind_srm

858993456

Is This Answer Correct ?    1 Yes 3 No

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

Answer / l09

8

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More C Code Interview Questions

Who could write how to find a prime number in dynamic array?

1 Answers  


Which one is taking more time and why ? :/home/amaresh/Testing# cat time.c //#include <stdio.h> #define EOF -1 int main() { register int c; while ((c = getchar()) != EOF) { putchar(c); } return 0; } ------------------- WIth stdio.h:- :/home/amaresh/Testing# time ./time_header hi hi hru? hru? real 0 m4.202s user 0 m0.000s sys 0 m0.004s ------------------ Witout stdio.h and with #define EOF -1 =================== /home/amaresh/Testing# time ./time_EOF hi hi hru? hru? real 0 m4.805s user 0 m0.004s sys 0 m0.004s -- From above two case , why 2nd case is taking more time ?

0 Answers  


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

1 Answers  


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

2 Answers  


which function is used to clear the buffer stream on gcc? for example: I wrote following code on gcc #include<stdio.h> int main(void) { char ch; int a,b; printf("\nenter two numbers:\t"); scanf("%d%d",&a,&b); printf("enter number is %d and %d",a,b); printf("\nentercharacter:\t"); scanf("%c",&ch); printf("enter character is %c",ch); return 0; } in above progarm ch could not be scan. why?plz tell me solution.

2 Answers  






main( ) { int a[2][3][2] = {{{2,4},{7,8},{3,4}},{{2,2},{2,3},{3,4}}}; printf(ā€œ%u %u %u %d \nā€,a,*a,**a,***a); printf(ā€œ%u %u %u %d \nā€,a+1,*a+1,**a+1,***a+1); }

2 Answers  


{ int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }

4 Answers  


main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }

1 Answers  


abcdedcba abc cba ab ba a a

2 Answers  


main() { int i, j, *p; i = 25; j = 100; p = &i; // Address of i is assigned to pointer p printf("%f", i/(*p) ); // i is divided by pointer p } a. Runtime error. b. 1.00000 c. Compile error d. 0.00000

3 Answers   HCL,


Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number

2 Answers   Ace Info,


There is a lucky draw held every day. if there is a winning number eg 1876,then all possible numbers like 1867,1687,1768 etc are the numbers that match irrespective of the position of the digit. Thus all these numbers qualify fr the lucky draw prize Assume there is no zero digit in any numbers. write a program to show all the possible winning numbers if a "winning number"is passed as an arguments to the function.

1 Answers   Nagarro,


Categories