Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why header file is used in c?

1051


What is time complexity c?

962


What is a protocol in c?

968


application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above

1032


What is #include conio h?

979


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

4262


What is the difference between typedef struct and struct?

1078


In c programming, explain how do you insert quote characters (? And ?) Into the output screen?

1221


What is the difference between exit() and _exit() function in c?

1042


What are 3 types of structures?

1042


How can variables be characterized?

2158


What are the types of bitwise operator?

1073


Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor

3493


how to write optimum code to divide a 50 digit number with a 25 digit number??

3232


Explain the binary height balanced tree?

1143