Hi there,

#include<stdio.h>
main()
{
int i;
i=1,2,3;
printf("Value of i with assignment as i=1,2,3 is %d\n", i);
i=(1,2),3;
printf("Value of i with assignment as i=(1,2),3 is %d\n", i);
i=1,(2,3);
printf("Value of i with assignment as i=1,(2,3)is %d\n", i);
i=(1,2,3);
printf("Value of i with assignment as i=(1,2,3) is %d\n", i);

}

Output:

Value of i with assignment as i=1,2,3 is 1
Value of i with assignment as i=(1,2),3 is 2
Value of i with assignment as i=1,(2,3)is 1
Value of i with assignment as i=(1,2,3) is 3

So, what is it all about?

Thanks
Swapna

Its all about something called the "comma operator" Here and Here are two more links

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.