Teaching Rajasthan Basic Computer Instructor 2021 Mock Test Programming and Data Structure Programming in C Scope of a Variable
What is the output of the following C code:
int main( )
{
int p=8,q=-3,r=0;
int x,y,z;
x = p && q && r ;
y = p || q && r ;
z = p && q || r ;
printf ("%d", x+y+z) ;
return 0;
}1
-1
2
0
3
1
4
2