0 votes 0 votes Ans is C can anybody justify why compilation error Programming in C programming-in-c output + – moin asked Mar 8, 2017 • edited Mar 8, 2017 by moin moin 731 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes so 11 should be ans/ 2018 answered Mar 8, 2017 2018 comment Share Follow See all 10 Comments See all 10 10 Comments reply moin commented Mar 8, 2017 reply Follow Share ans is C 0 votes 0 votes 2018 commented Mar 8, 2017 reply Follow Share why compiler error??is there any flaw in this code..u can check and verify with some online compiler 0 votes 0 votes moin commented Mar 8, 2017 reply Follow Share on techtud they mention error in this line k=(i+j)++; my ans was also 11 0 votes 0 votes Kapil commented Mar 8, 2017 reply Follow Share The error is L - value error ,I.e It is definitely wrong to write (i+j) = (i+j) +1. This error comes under compiler error . 1 votes 1 votes moin commented Mar 8, 2017 reply Follow Share can you explain what is L value error 0 votes 0 votes 2018 commented Mar 8, 2017 reply Follow Share thanks @kapil for clarification https://en.wikipedia.org/wiki/Value_(computer_science) https://msdn.microsoft.com/en-us/library/bkbs2cds.aspx 1 votes 1 votes 2018 commented Mar 8, 2017 reply Follow Share but why @kapul when i run on code block GCC compiler even it is not giving any worning message and print 11 successfully? 0 votes 0 votes Kapil commented Mar 8, 2017 reply Follow Share Where have you written (i+j)++ ? 1 votes 1 votes 2018 commented Mar 8, 2017 reply Follow Share ohh, thank anyway.. 0 votes 0 votes dd commented Mar 19, 2017 reply Follow Share (i+j) is an intermediate constant value, can't be incremented. So (i+j) is basically a r-value. 2 votes 2 votes Please log in or register to add a comment.
0 votes 0 votes i+j=11and it is executing in the way 11++ which is compilation error. Purvi Agrawal answered Mar 10, 2017 Purvi Agrawal comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes compile error as lvalue required for post increment akankshadewangan24 answered Apr 20, 2017 akankshadewangan24 comment Share Follow See all 0 reply Please log in or register to add a comment.