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

Question: We would like to design and implement a programming solution to the reader-writer problem using semaphores in C language under UNIX. We assume that we have three readers and two writers processes that would run concurrently. A writer is to update (write) into one memory location (let’s say a variable of type integer named temp initialized to 0). In the other hand, a reader is to read the content of temp and display its content on the screen in a formatted output. One writer can access the shared data exclusively without the presence of other writer or any reader, whereas, a reader may access the shared memory for reading with the presence of other readers (but not writers).

1 Answers  


#define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); }

3 Answers  


int aaa() {printf(“Hi”);} int bbb(){printf(“hello”);} iny ccc(){printf(“bye”);} main() { int ( * ptr[3]) (); ptr[0] = aaa; ptr[1] = bbb; ptr[2] =ccc; ptr[2](); }

1 Answers  


How we print the table of 3 using for loop in c programing?

7 Answers  


char *someFun1() { char temp[ ] = “string"; return temp; } char *someFun2() { char temp[ ] = {‘s’, ‘t’,’r’,’i’,’n’,’g’}; return temp; } int main() { puts(someFun1()); puts(someFun2()); }

2 Answers  






How can i find first 5 natural Numbers without using any loop in c language????????

2 Answers   Microsoft,


main() { unsigned int i=10; while(i-->=0) printf("%u ",i); }

2 Answers   HP,


How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)

4 Answers   HCL,


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

0 Answers  


main() { char * strA; char * strB = I am OK; memcpy( strA, strB, 6); } a. Runtime error. b. I am OK c. Compile error d. I am O

4 Answers   HCL,


void main() { int i=5; printf("%d",i++ + ++i); }

3 Answers  


main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); } int i;

1 Answers  


Categories