1. a. (5 points) What will be the output of the C code.
int main()
{
int x = 2, y = 5;
printf("%d", x&&y);
return 0;
}
b. (5 points) What will be the output of the C code
int main()
{
float x = 2.0, y = 5.0;
printf("%d", x&y);
return 0;
}
c. (5 points) What will be the output of the C code
int main()
{
int x = 3; //...0011
int y = 7; //...0111
// A typical use of '&'
if (y > 1 && y > x)
printf("y is greater than 1 AND y\n");
// A typical use of '&'
int z = x & y; // 0011
printf ("z = %d", z);
return 0;
}