Give the logic for this
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a=10,b;
b=++a + ++a;
printf("%d", b);
getch();
}
Output: 24......How?
Answer Posted / krishnaraogm
in first increment the a will become 11. And the second
increment the a will become 12. b=++a + ++a ; have same
variable so b=12+12=24
| Is This Answer Correct ? | 5 Yes | 5 No |
Post New Answer View All Answers
how many errors in c explain deply
what do you mean by inline function in C?
Why ca not I do something like this?
How can I make sure that my program is the only one accessing a file?
What is wrong with this program statement?
Is there any data type in c with variable size?
What is pointers in c?
Subtract Two Number Without Using Subtraction Operator
how logic is used
Which is best book for data structures in c?
#include
Why isn't it being handled properly?
What is the best organizational structure?
What does a pointer variable always consist of?
What is difference between array and pointer in c?