Friday, May 16, 2008

What is the output

void main()
{
int a = (1,2,3);
printf("%d",a);
}

with reason


The answer is 3

The value which is last in the bracket is assigned to a(the variable).If it would have been any other value except 3,then it would have been assigned to 'a'.

No comments:

Contributors