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 output for the following program main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }

1 Answers  


why is printf("%d %d %d",i++,--i,i--);

4 Answers   Apple, Cynity, TCS,


void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(“%d”,k); }

1 Answers  


Write a routine to draw a circle (x ** 2 + y ** 2 = r ** 2) without making use of any floating point computations at all.

2 Answers   Mentor Graphics, Microsoft,


void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }

2 Answers  






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

1 Answers  


Write a program to check whether the number is prime and also check if it there i n fibonacci series, then return true otherwise return false

1 Answers   Cognizant, lenovo,


How to use power function under linux environment.eg : for(i=1;i<=n;i++){ pow(-1,i-1)} since it alerts undefined reference to 'pow'.

2 Answers  


#include<stdio.h> main() { FILE *ptr; char i; ptr=fopen("zzz.c","r"); while((i=fgetch(ptr))!=EOF) printf("%c",i); }

1 Answers  


write a program to find out roots of quadratic equation "x=-b+-(b^2-4ac0^-1/2/2a"

2 Answers  


main() { int i=10; i=!i>14; Printf ("i=%d",i); }

1 Answers  


main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcpy(a,b)); } a. “Hello” b. “Hello World” c. “HelloWorld” d. None of the above

4 Answers   Corporate Society, HCL,


Categories