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 / vignesh1988i
22 21 21 20 THIS WILL THE OUTPUT..
this is merely an STACK operation.... here we have 4
parameters.. so the four parameters will be pushed inside
the stack one by one... as
TOP : k
++k
k++
BOTTOM : k
so the expressions will be evaluated from the top.. and thus
the answer....
thank u
| Is This Answer Correct ? | 9 Yes | 3 No |
Post New Answer View All Answers
What is 'bus error'?
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
What is the role of this pointer?
What is the difference between far and near in c?
What is difference between class and structure?
What is #line?
What is a program flowchart and how does it help in writing a program?
What is pointer & why it is used?
Why is void main used?
Explain two-dimensional array.
How many types of sorting are there in c?
What does c mean before a date?
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
What are the types of arrays in c?
Why c is called procedure oriented language?