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
Write a program of advanced Fibonacci series.
What is return in c programming?
differentiate built-in functions and user – defined functions.
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
Explain how do you generate random numbers in c?
What are static variables in c?
What is the purpose of void in c?
Describe static function with its usage?
Why c is known as a mother language?
Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......
Explain high-order and low-order bytes.
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 how are 16- and 32-bit numbers stored?
What is the difference between array and pointer in c?
Explain how do you determine a file’s attributes?