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...

void main()
{
int i=5;
printf("%d",i++ + ++i);
}

Answer Posted / vivers

There are two different questions..
in which its asking the result for

1)(i++ + ++i)
answer will be---> 12
"as addition will takes place from left to right
step1: i++ = 5;
step2: value of i will be updated before taking value of
another operand and hence i = 6;
step3: ++i = 7 as first increment will happen and then value
will be used.
final result: 5 + 7 = 12"

2) (i+++++i)
answer will be---> compile error
"because illegal combination of operators"


best of luck...

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is realloc in c?

1167


What is the purpose of scanf() and printf() functions?

1299


What is the use of header files?

1156


What is structure of c program?

1230


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

1166


Why can’t constant values be used to define an array’s initial size?

1439


What is the purpose of main( ) in c language?

1186


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

1172


What is the use of getch ()?

1118


Is swift based on c?

1151


What are nested functions in c?

1072


What is spaghetti programming?

1200


Why is c called "mother" language?

1333


What are the features of c language?

1125


What are multidimensional arrays?

1171