+ 1
Post incriment in C
Why whe i give a++ as argument for printf it takes a+1 and not just a. Isnt it just a normal function? https://code.sololearn.com/cK9JXw25bWml/?ref=app
3 RĂ©ponses
+ 3
the variable x = 5
var = x++ - the var variable will collect the value 5 and then the sum x + 1, ie a = 6 and var = 5
var = ++x - the code adds a + 1 first and then stores the value inside var, ie a = 6 and var = 6
+ 4
Because the print statement is in the next line, after the post increment is done.
+ 2
Thank you all ... đ