0
#include<stdio.h>

int main(){
    int a=2;
    printf("%d %d %d", a, a++, a++);
    return 0;
}

Output:

4 3 2

For additional information, I'm using Visual Studio with gcc compiler installed.

  • The order of evaluation of function arguments is not specified. Your code could as well display `2 3 4`. That being said: never write nonsense code like this. – Jabberwocky Mar 17 '22 at 12:55
  • 1
    It is giving you a lesson on why not to do multiple things on one line. Write simple, clear code. – stark Mar 17 '22 at 12:55

0 Answers0