#include<stdio.h>
main()
{
int a=5;
printf("%d,%d%,d",++a,++a,++a);
}

the output of this is 8,7,6 instead of 6,7,8
y it is so...

I think it's because of the C calling convention. Arguments are passed in the order right-to-left (last ++a to string)

No, it's because of this

commented: Yes. +8
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.