krishnarao


{ City } madurai
< Country > india
* Profession * goal
User No # 66880
Total Questions Posted # 0
Total Answers Posted # 1

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 5
Users Marked my Answers as Wrong # 5
Questions / { krishnarao }
Questions Answers Category Views Company eMail




Answers / { krishnarao }

Question { Accenture, 4859 }

Give the logic for this

#include
#include
void main()
{
clrscr();
int a=10,b;
b=++a + ++a;
printf("%d", b);
getch();
}
Output: 24......How?


Answer

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