What will be the output of 10++ + ++20 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What will be the output of 10++ + ++20

when i tried running this code it came up error stating "lvalue required as increment operand "

8th Aug 2016, 7:11 PM
Aditya Kolte AKo
Aditya Kolte AKo - avatar
3 Answers
+ 3
Increment operators are to be used with variables, such as an int. int a = 10, b = 20; cout << a++ + ++b; This will work.
8th Aug 2016, 7:15 PM
Cohen Creber
Cohen Creber - avatar
+ 3
great!! it did work out.. thanks
8th Aug 2016, 7:43 PM
Aditya Kolte AKo
Aditya Kolte AKo - avatar
0
hahahahahaha
11th Aug 2016, 10:24 AM
Sandesh S
Sandesh S - avatar