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
What is the difference between char array and char pointer?
Why does everyone say not to use gets?
if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.
Explain zero based addressing.
Is there a way to compare two structure variables?
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)
What is the role of this pointer?
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
What is nested structure with example?
What is wrong with this code?
What is c standard library?
Can you pass an entire structure to functions?
What is define c?
How can you read a directory in a C program?
Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent