+ 1
Can any one tell me whats wrong.
4 Answers
+ 4
Line 5 : You missed the semicolon after the declaration.
Line 12 : The condition inside if is a=!b. This will apply ! to b and then assign it to a. ! will convert a non-zero value to 0 and 0 to 1. Then assignment copies !b to a and then returns the value of a. In cases where b is non-zero, a becomes 0 and the if block is skipped. Thus replace the condition with a!=b.
+ 4
int a,b;
+ 3
Thanks