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 / rajadurai thangaraj
22 21 22 22
stack execution:-
4 ->printf k now k=22
3 ->printf 21 k=k+1 now k=22, k of 1&2 also 22
2 ->k=k+1 printf k now k=21, k of 1 also 21
1 ->printf k now k=20
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
differentiate built-in functions and user – defined functions.
What is structure padding and packing in c?
code for find determinent of amatrix
What is variable declaration and definition in c?
Difference between linking and loading?
What is time null in c?
How will you find a duplicate number in a array without negating the nos ?
what do you mean by inline function in C?
How can I recover the file name given an open stream?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
formula to convert 2500mmh2o into m3/hr
What language is lisp written in?
Write a program to print "hello world" without using a semicolon?
What is size of union in c?
What is spaghetti programming?