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 / sunil
answer is
22 21 21 20
printf .. executes from left hand side..
so first ..
printf("$d %d %d %d",k,K++,++k,k);
4.last k ie; 20
3.++k (pre) : 21
2.k++ (post) : 21 and then increamented
1.k : 22
answer is : 22 21 21 20
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
How main function is called in c?
What is wrong in this statement? scanf(ā%dā,whatnumber);
What math functions are available for integers? For floating point?
What does c mean in standard form?
List the variables are used for writing doubly linked list program.
how to make a scientific calculater ?
Why is c called a structured programming language?
Is null always equal to 0(zero)?
Differentiate between ordinary variable and pointer in c.
What is pointer to pointer in c with example?
a program that can input number of records and can view it again the record
Multiply an Integer Number by 2 Without Using Multiplication Operator
What is chain pointer in c?
What is break in c?
how to introdu5ce my self in serco