C++
Programming and Technical
Programming
what is i++? means
Read Solution (Total 10)
-
- suppose i=2
a = i++ ----> a= 2 and then i is incremented that is 3
if a=++i ------> a = 3 and i =3 - 9 years agoHelpfull: Yes(2) No(0)
- it is post increment means first use the value then increment
eg:
i=1;
j=i++; and print i and j value. you will get j= 1 and i=2 means first use i value by assigning then increment to 2
- 8 years agoHelpfull: Yes(2) No(0)
- increments the value of " i " & returns the original value which "i" held before being incremented...
- 10 years agoHelpfull: Yes(1) No(0)
- i++ means increment and i-- means decrement
- 9 years agoHelpfull: Yes(0) No(0)
- i++ means increment
solve
5++ = 6ans - 9 years agoHelpfull: Yes(0) No(1)
- prefix increment operator
- 9 years agoHelpfull: Yes(0) No(0)
- increment value of i bye 1.this is post increment.After semicolon in a statement of program value of i increse by 1
- 9 years agoHelpfull: Yes(0) No(0)
- ++ and -- are increment and decrement operator respectively...
They can be used with only variables like i .
suppose i=5;
i++ will result in 6
i++ will resullt in 4
But, printf("%d %d",i++,i--); can result in Undefined Behaviour.. So be careful in using ++ and -- oprtaor.
Moreover,
5++ will give Compile error. - 8 years agoHelpfull: Yes(0) No(0)
- it means
i is incremented..
i=i+1; - 8 years agoHelpfull: Yes(0) No(0)
- Post increment
- 7 years agoHelpfull: Yes(0) No(0)
C++ Other Question