63 155
Assignments Done
99,3%
Successfully Done
In July 2018

Answer to Question #53464 in C for rajashree g.s.

Question #53464
#include<stdio.h>
int main()
{
int x=10,y=20;
if(x==y);
printf("\n %d %d",x,y);
return 0;
}
after the if statement there is no semicolon sir.If semicolon is there after the if statement what will be the output sir.
Expert's answer
If the semicolon is not there, the output will be just values of x and y. If it is, in the other hand, the output will be void. The reason is than the semicolon halts the execution of operators. It just does the if statement, and after that does printf function, independently.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions