In below two codes what will be out put and what is the difference of out put how it is working?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

In below two codes what will be out put and what is the difference of out put how it is working??

#include<stdio.h> int main() { int a=2,b=4; printf("%d",a&&b); } _______________________________ #include<stdio.h> int main() { int a=2,b=4; printf("%d",a&b); }

12th Aug 2020, 6:55 AM
Pavan Kumar
4 Answers
+ 3
Sorry that is for OMA Falk...:) And thank you for swim for your explanation
12th Aug 2020, 7:41 AM
Pavan Kumar
+ 3
Pavan kumar , please use appropriate tags for programming language. Thanks!
12th Aug 2020, 12:04 PM
Lothar
Lothar - avatar
+ 2
Thank you for your answer swim but I understood the 2 Nd program as there is only one AND is there so we will calculate by binary and rule of AND gate but in first code there are 2AND are there if we calculate then how we will get as one I am not getting that...so I posted the question swim..:)
12th Aug 2020, 7:39 AM
Pavan Kumar
0
I am sure you already copied it to code playground and saw the result. Please specify which part is still open.
12th Aug 2020, 7:24 AM
Oma Falk
Oma Falk - avatar