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 / puja
THE ANSWER WILL BE
20 20 22 22
BECAUSE THE FIRST VALUE IS K=20 THEN IT WILL BE THE SAME
20 DUE TO K++, NOW THE VALUE WILL BE INCREMENTED & WILL BE
21, THEN ++K, MEANS THE VALUE WILL BE +1 THEN IT WILL BE 22
& LAST K WILL BE SAME 22.
| Is This Answer Correct ? | 3 Yes | 5 No |
Post New Answer View All Answers
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)
What is 1f in c?
How do you list a file’s date and time?
What is identifier in c?
Explain what will the preprocessor do for a program?
Explain about the functions strcat() and strcmp()?
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }
Write a C program in Fibonacci series.
Why do we use static in c?
explain how do you use macro?
What is the acronym for ansi?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
How can my program discover the complete pathname to the executable from which it was invoked?
Is c++ based on c?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above