Which one of the following operators is a unary operator in c language? ans.&<<&&sizeof() Previous Marked for Review Next
Question
Which one of the following operators is a unary operator in C language?
- ans.
- &
- <<
- &&
- sizeof()
Solution
The unary operator in C language from the given options is sizeof().
Here's why:
-
& (Address of) Operator: This is a unary operator which returns the memory address of its operand.
-
<< (Left Shift) Operator: This is a binary operator which shifts the bits of the number at its left for the number of places specified by the number at its right.
-
&& (Logical AND) Operator: This is a binary operator which returns true if both its operands are true.
-
sizeof() Operator: This is a unary operator which returns the size of the variable or datatype placed inside its parentheses.
So, the unary operator from the given options is sizeof().
Similar Questions
Which one of the following operators is a unary operator in c language? ans. & sizeof() << &&
Understanding Unary operators#include <stdio.h>void main() { int a = 10, b; b = a++ + ++a; printf("%d %d\n", a, b);}What is the a = b =
Which of the following is NOT a Java operator?Note: When in doubt, try it out in IntelliJ.Question 5Answera.!=b.!c.<=d.-<e.-=
What are the different types of operators in C++? Provide examples of each type.
In C programming, which of the following statements is true about the >>= operator?
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.