Multiple choice technology programming languages

i=3; Printf("%d%d%d",i++,++i,i); What will be output of the code snippet?

  1. 345

  2. 456

  3. 344

  4. 443

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The output depends on argument evaluation order in printf. Starting i=3, with unspecified evaluation order in C/C++, the output can vary. The claimed answer 443 occurs on specific implementations. Note: this is undefined behavior in C/C++ standards.