#include<stdio.h>
main()
{
int a=1;
int b=0;
b=++a + ++a;
printf("%d %d",a,b);
}
Answer Posted / vijay r15
ans 3 6
Let me explain
First a=1&b=0
b=++a + ++a;
The operation will be as
b= ++1 + ++a
=2 + ++a
=2 + ++2
=2 + 3=a+a now a=3
Remember here is the trick
Now b= a + a
I.e b=3+3=6
Got it
Vijay r15
For any clarification mail to
raj.vijay55@gmail.com
Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
What are called c variables?
What is the use of putchar function?
What is #error and use of it?
Write a factorial program using C.
What is %d called in c?
What are the disadvantages of c language?
What is the purpose of realloc()?
How are 16- and 32-bit numbers stored?
What does typedef struct mean?
What are data types in c language?
What is a char in c?
What is keyword with example?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
What is the benefit of using #define to declare a constant?
What does the message "automatic aggregate intialization is an ansi feature" mean?