0 votes 0 votes closed with the note: undefined behaviour Programming in C testbook-test-series programming-in-c + – jatin khachane 1 asked Dec 27, 2018 • closed Dec 27, 2018 by Shaik Masthan jatin khachane 1 700 views comment Share Follow See all 12 Comments See all 12 12 Comments reply aimhigh commented Dec 27, 2018 reply Follow Share 16+36= 52?? 0 votes 0 votes adarsh_1997 commented Dec 27, 2018 reply Follow Share 52? 0 votes 0 votes jatin khachane 1 commented Dec 27, 2018 reply Follow Share No answer given 84 @Shaik Masthan I think here problems related to seq point concept as MUL(i++) will be replaced by p = i++ + i++; Please can you explain this in brief 0 votes 0 votes srestha commented Dec 27, 2018 reply Follow Share yes undefined behaviour 0 votes 0 votes Amal commented Dec 27, 2018 reply Follow Share @aimhigh run the code and get the correct answer 0 votes 0 votes aimhigh commented Dec 28, 2018 reply Follow Share Why undefined behavior..pls someone give reason 0 votes 0 votes Shaik Masthan commented Dec 28, 2018 reply Follow Share @aimhigh already jatin mentioned it MUL(i++) will be replaced by p = i++ + i++; with in a sequence point, a variable update and accessed or updated twice it lead to undefined behavior in C 1 votes 1 votes jatin khachane 1 commented Dec 28, 2018 reply Follow Share @Shaik Masthan I am not very clear in this sequence point concept..it will be great help if you can write brief answer to it if you are free .. thanks 0 votes 0 votes aimhigh commented Dec 31, 2018 reply Follow Share p = i++ * i++ q = ++i * ++i 0 votes 0 votes aimhigh commented Dec 31, 2018 reply Follow Share Oh both statements having two increment in one line . That's the reason for undefined behavior?? 0 votes 0 votes Shaik Masthan commented Dec 31, 2018 reply Follow Share @aimhigh yes. for getting some clarity on undefined behavior https://en.wikipedia.org/wiki/Sequence_point 1 votes 1 votes aimhigh commented Dec 31, 2018 reply Follow Share Thanks @Shaik Masthan 0 votes 0 votes Please log in or register to add a comment.