0 votes 0 votes closed with the note: Undefined behaviour How does the following expression evaluate to if suppose n=2 n=2; a[++n]=n++; CJ147 asked Oct 13, 2018 • closed Oct 15, 2018 by Arjun CJ147 319 views comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes It has undefined behavior , depends on the compiler . If anyhow answer is required , it might be a[3] = 3. prashant jha 1 answered Oct 13, 2018 prashant jha 1 comment Share Follow See all 3 Comments See all 3 3 Comments reply monika7537 commented Oct 15, 2018 reply Follow Share shudnt it be a[4]=2 ? 0 votes 0 votes Arjun commented Oct 15, 2018 reply Follow Share When something is undefined, you should not try to say an answer 1 votes 1 votes prashant jha 1 commented Oct 15, 2018 reply Follow Share Yes Arjun sir . That's correct 0 votes 0 votes Please log in or register to add a comment.