Hi!
Can anyone explain why the output of the code
below is 6 7 7 ?

#include <stdio.h>

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

Hi!
Can anyone explain why the output of the code
below is 6 7 7 ?

#include <stdio.h>

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

I was expecting 5 6 7...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.