Operators
- Which of the following is not a logical operator?
-
View Hint View Answer Discuss in Forum
& is a Bitwise Operator.
Correct Option: A
& is a Bitwise Operator.
- Which of the following statements are correct about the program given below?
#include <stdio.h>
int main ( )
{
float x = 2.8, y = 2.88;
if (x = y)
printf ("x and y are equal\n");
else
printf ("x and y are not equal\n");
return 0;
}
-
View Hint View Answer Discuss in Forum
There is a non zero assignment value inside "if" so, it if condition will be true hence The output of the program would be "x and y are equal".
Correct Option: A
There is a non zero assignment value inside "if" so, it if condition will be true hence The output of the program would be "x and y are equal".
- Which of the following is correct order of evaluation for the expression given below ?
c = a + b * c / 4 % 2 -1;
-
View Hint View Answer Discuss in Forum
Refer precedence table
Correct Option: A
Refer precedence table
The output will be
* / % + - =
- Which of the following is the correct output for the program given below?
#include <stdio.h>
int main ( )
{
int a, b, c;
a = b = c =1;
printf ("a = %d b = %d c = %d\n", ++a, b++, ++c);
return 0;
}
-
View Hint View Answer Discuss in Forum
a = 2 b = 1 c = 2
Correct Option: A
a = 2 b = 1 c = 2
- Choose the easiest numbering system to covert a binary number 1110000111110101.
-
View Hint View Answer Discuss in Forum
In hexadecimal, each 4 digit binary represented by a single hexadecimal digit.
Correct Option: C
In hexadecimal, each 4 digit binary represented by a single hexadecimal digit.