DEV Community


Discussion on: Is "C Programming language" Still Worth Learning in 2021?

vlasales profile image
Vlastimil Pospichal • Edited

It's funny. First using i, then increment i, then use i as a second parameter.

The result is the same:

#include <stdio.h>

int main() {
  int i = 1;
  printf("%d, %d", i++, i+1);
Thread Thread
pentacular profile image
pentacular • Edited

Your results are wrong. :)

They're wrong because they're showing how your implementation decided to implement this undefined behavior, this time, and don't reflect on how C works.