Huawei
Company
Programming
Basics
#include
int main()
{
int a,b;
if(a=1,b=0)
printf("Yes");
else
printf("No");
return 0;
}
Read Solution (Total 5)
-
- ANS IS NO Bcz here we have to remember comma operator functioning,
where ever u encounter comma operator u have to see which one is right mst is gng to be execute frst,so if condition bcm zero so esle part bcm excute. - 9 years agoHelpfull: Yes(5) No(0)
- Answer is No in if (any one 0 will result total 0)
- 9 years agoHelpfull: Yes(2) No(4)
- else part will be executed
ans: No - 9 years agoHelpfull: Yes(0) No(0)
- Hi vinu can u explain me how is it because if we take a=0,b=1 then o/p-yes
if we take a=0,b=0 then o/p-no & if we take a=1,b=1 then o/p-yes - 9 years agoHelpfull: Yes(0) No(1)
- solution is no,because if we use int a garbage value is assigned to a and b. so prints no.
- 5 years agoHelpfull: Yes(0) No(0)
Huawei Other Question