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 / robin
different compiler gives different ans..
this is for tc
but its true it work as stack
last in first out
value of k is store in stack
1. k = 20
2. ++k = 21 (Pre Increment )
3. k++ = 21 (Post Increment(k value now is 22))
4. k = 22
As 22 is last it is printed 1st.........
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
`write a program to display the recomended action depends on a color of trafic light using nested if statments
What is ambagious result in C? explain with an example.
What is pre-emptive data structure and explain it with example?
What is c standard library?
What is meant by gets in c?
What is the argument of a function in c?
What is string function c?
What is a scope resolution operator in c?
What does 4d mean in c?
What is a string?
Is c procedural or functional?
count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array
How does selection sort work in c?
In C language, a variable name cannot contain?
What is #define used for in c?