i am a complete beginner in C, so please bear with me .
well i wrote a simple program , but i have no idea why it is not working! its pretty simple you know !
here is my code
what is wrong with
//in the name of god
printf("\nPlease Enter 2 operands and then your desigred operator(+/*)");
printf("x = %d,,y = %d Operator:%c\n",x,y,c);
if (c == '*' )
printf("x * y = :%d",x*y);
else if (c == '+' )
printf("x + y:%d",x+y);
i noticed that if i write
it would work perfectly! but i really dont know what is the difference between the two!
would anyone help me ?