WHAT WILL BE OUTPUT OF BELOW CODE . . AND PLEASE EXPLAIN HOW
IT COME ..
#include<stdio.h>
#include<conio.h>
void main()
{
int k=20;
printf("%d%d%d%d",k,k++,++k,k);
getch();
}
Answer Posted / anand
The answer should be 22212120
Arguments passed to the printf statement would get executed
from the right to left..
1. k = 20
2. ++k = 21 (Pre Increment)
3. k++ = 21 (Post Increment(k value now is 22))
4. k = 22
Thus the output : 22212120
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
#include
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent
What is page thrashing?
Explain what is a static function?
Why is c fast?
What is hashing in c?
how to write optimum code to divide a 50 digit number with a 25 digit number??
What is a nested loop?
What is the purpose of the statement: strcat (S2, S1)?
Why c is known as a mother language?
What is #error and use of it?
Explain the difference between ++u and u++?
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.