void main()

{

int i=i++,j=j++,k=k++;

printf(“%d%d%d”,i,j,k);

}



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

Answer / susie

Answer :

Garbage values.

Explanation:

An identifier is available to use in program code from
the point of its declaration.

So expressions such as i = i++ are valid statements. The i,
j and k are automatic variables and so they contain some
garbage value. Garbage in is garbage out (GIGO).

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More C Code Interview Questions

What is the subtle error in the following code segment? void fun(int n, int arr[]) { int *p=0; int i=0; while(i++<n) p = &arr[i]; *p = 0; }

1 Answers  


main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024

2 Answers   HCL,


what is the output of the below program & why ? #include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); }

6 Answers   CSC, IIIT,


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

3 Answers   HCL,


find simple interest & compund interest

2 Answers  






How to count a sum, when the numbers are read from stdin and stored into a structure?

1 Answers  


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

1 Answers   Zoho,


abcdedcba abc cba ab ba a a

2 Answers  


write a program in c language to get the value of arroy keys pressed and display the message which arrow key is pressed?

1 Answers  


Write out a function that prints out all the permutations of a string. For example, abc would give you abc, acb, bac, bca, cab, cba. You can assume that all the characters will be unique.

5 Answers   IITR, Microsoft, Nike,


what will be the output of this program? void main() { int a[]={5,10,15}; int i=0,num; num=a[++i] + ++i +(++i); printf("%d",num); }

3 Answers   Wipro,


main() { main(); }

1 Answers  


Categories