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 is the scope of static variables in c language?

638


What is the sizeof () a pointer?

561


Describe the order of precedence with regards to operators in C.

642


What are identifiers in c?

647


Explain the difference between #include "..." And #include <...> In c?

638






Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.

695


Is sizeof a keyword in c?

588


What is default value of global variable in c?

575


What does 1f stand for?

623


hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel

1422


When a c file is executed there are many files that are automatically opened what are they files?

600


What is "Hungarian Notation"?

647


Explain argument and its types.

614


What are the different types of endless loops?

633


How do you override a defined macro?

711