C - Operators - Discussion

You Are Here :: Home > C > Operators - Discussion

 



Q.

What will be the output of following code ?

#include
int main( )
{
int x=10,y=20;
if(x = = y)
printf("%d%d",x,y);
return 0;
}

A. Garbage values B. None of above
C. Prints Nothing D. Raise an error

Answer: Option C
Explaination:

 


As the condition of if statement is not true, so the statement immediately after if that is print statement will not be executed and the code prints nothing.








Discussion

Your Comments Goes here...
NameDiscussion