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

Answer Posted / dhivya

11 11 13
++i which means i is first incremented and then printed thus i value becomes 11,
i++ which means i is printed and then it is incremented, since the value of i is now 11, it is printed and then incremented to 12.
again ++i , increments i to 13 and then prints.

Is This Answer Correct ?    66 Yes 38 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe the modifier in c?

603


What is typedef?

677


What is the method to save data in stack data structure type?

606


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

603


What is structure pointer in c?

571






what is the difference between 123 and 0123 in c?

722


How can you find out how much memory is available?

618


What is getch?

633


Is null a keyword in c?

737


Is int a keyword in c?

557


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

643


FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.

1202


What is pointer in c?

742


Is c++ based on c?

652


what do you mean by inline function in C?

618