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 / dasari prasad
Output is 22 21 21 22
Because n printf evaluation starts from last parameter
because of STACK.. so calculate k value from last i.e k=20
and ++k=21 ,k++=21(post incre),k=22.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What does sizeof return c?
How the c program is executed?
Is c still relevant?
write a program to find the given number is prime or not
How many types of operator or there in c?
Why double pointer is used in c?
Explain how do you list files in a directory?
Explain heap and queue.
What is the scope of an external variable in c?
What does %c do in c?
What is nested structure?
Explain the binary height balanced tree?
What is sizeof int?
What are the advantages of Macro over function?
typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?