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

how many errors in c explain deply

2093


what do you mean by inline function in C?

1059


Why ca not I do something like this?

1015


How can I make sure that my program is the only one accessing a file?

1280


What is wrong with this program statement?

1044


Is there any data type in c with variable size?

1105


What is pointers in c?

1119


Subtract Two Number Without Using Subtraction Operator

855


how logic is used

1976


Which is best book for data structures in c?

1094


#include { printf("Hello"); } how compile time affects when we add additional header file .

1898


Why isn't it being handled properly?

1069


What is the best organizational structure?

1124


What does a pointer variable always consist of?

1104


What is difference between array and pointer in c?

1098