New course! Every coder should learn Generative AI!
Try a free lesson+ 2
i=0; i++*++i=?
3 Answers
+ 3
it is I which is 0 then increment then multiply after that increment then i which is two now so answer 0 as 0*2
+ 3
The answer is zero(0).
Steps:
1.i++ stays 0 as it is post increment.
2.i value becomes 1
3.++i becomes 2 as it is pre increment.
4.so the machine executes it as 0*2
5. Machine returns answer as 0
😀😀
Happy coding! : )
+ 2
0