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

Why doesn't the code "a[i] = i++;" work?

Answer Posted / abdur rab

The answer from wikipedia

Sequence point comes into play when the same variable is
modified more than once. An often-cited example is the
expression i=i++, which both assigns i to itself and
increments i; what is the final value of i? Language
definitions might specify one of the possible behaviors or
simply say the behavior is undefined. In C and C++,
evaluating such an expression yields undefined behavior.

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of macro formats?

1163


What is hashing in c language?

1420


What is n in c?

1110


What is extern keyword in c?

1184


How can I write functions that take a variable number of arguments?

1187


Which type of language is c?

1118


Why doesn't C support function overloading?

2865


What is the scope of global variable in c?

1034


What are the different types of data structures in c?

1215


How do shell structures work?

1171


What is volatile variable in c?

1155


Which control loop is recommended if you have to execute set of statements for fixed number of times?

1406


What is #include stdlib h?

1145


Why does this code crash?

1144


What is the sizeof () a pointer?

1046