0
Why the output is 14?
Increament code https://code.sololearn.com/cDjCMK0688Ax/?ref=app
3 Answers
+ 6
Learn increment and decrement operators in C, you can easily get it .
+ 5
Increment, types:
pre-increment (++a) increases a before doing the operations in this line.
post-increment (a++) increases a after doing the operations in this line.
Examples:
int a = 2;
int b = a++; // b = 2
//INCREASE A VALUE
int c = a; // c = 3
ââââââââââââ-
int a = 2;
int b = ++a; // b = 3 (increases aâs value before doing the operatiospns
int c = a; // c = 3
Hope this helps
0
My answer is 13 but the compiler is giving 14