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 / karthikeyan
20 20 22 22
solution
1) k corresponds to 20 20
2) k++ corresponds to k = k then k+1 20
after assignment k becomes 21
3) ++k corresponds to k + 1 then k = k 22
4) k corresponds to k 22
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
Explain can you assign a different address to an array tag?
Differentiate fundamental data types and derived data types in C.
How many levels deep can include files be nested?
What is selection sort in c?
What is a protocol in c?
What is the difference between array and pointer?
What is function and its example?
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
write a c program in such a way that if we enter the today date the output should be next day's date.
How can you return multiple values from a function?
Explain how can you tell whether two strings are the same?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
What are the types of i/o functions?
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
What are the data types present in c?