mohan
Answered On : Oct 5th, 2012
good&a=1
Login to rate this answer.
The resulting output is "good&a = 6".
Reason: the result of the expression 1,3,5,6 is 6, which is assigned to a as part of the condition. Since 6 is non-zero, the first branch is taken.
Read up on the comma operator for details.
Login to rate this answer.
udit
Answered On : Oct 31st, 2012
good&a=1
Login to rate this answer.
rahul jadhav
Answered On : Nov 21st, 2012
good&a=1
Login to rate this answer.
FahadFirozKhan
Answered On : Jan 23rd, 2013
error: #include expects "FILENAME" or
error: expected identifier or { before } token
#include
void main()
{
int a=1;
if(a=1,3,5,6)
printf("good&a=%d",a);
else
printf("bad&a=%d",a);
}
//Output
good&a=1
Login to rate this answer.