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
Why header file is used in c?
What is time complexity c?
What is a protocol in c?
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above
What is #include conio h?
What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.
What is the difference between typedef struct and struct?
In c programming, explain how do you insert quote characters (? And ?) Into the output screen?
What is the difference between exit() and _exit() function in c?
What are 3 types of structures?
How can variables be characterized?
What are the types of bitwise operator?
Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor
how to write optimum code to divide a 50 digit number with a 25 digit number??
Explain the binary height balanced tree?