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 do you mean by c what are the main characteristics of c language?
What is c variable?
What is function prototype in c language?
Differentiate between new and malloc(), delete and free() ?
What is conio h in c?
What are the ways to a null pointer can use in c programming language?
Why do we use main function?
What is the use of #define preprocessor in c?
Why we use conio h in c?
Can an array be an Ivalue?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
What does static variable mean in c?
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??
How many types of sorting are there in c?
Why calloc is better than malloc?