About C Interview Questions on Operators
This C Interview Questions on Operators page providing interview questions on C operator including arithmetic operators, conditional, modify, relational, logical, bitwise and shift operators.
C Interview Questions on Operators
What is an operator?
The operator is a symbol which performs an operation on 1 or More operands.
What is operand?
The operand can be a value or variable or function call …
What is a Unary operator?
The operator which performs an operation on a single operand.
Example of the Unary operator?
Modify operators are the examples of Unary operators in C.
What is the pre-increment?
pre-increment operator first increases the value of a variable by 1 and substitute in expression.
What is post-increment?
post-increment first substitutes the value in the expression and increase the value.
Which is having higher priority among Relational and Arithmetic?
What does mod operator return after the evaluation?
the mod(%) operator returns remainder after performs division operators among 2 operands.
What is the use of Compound assignment operator?
Decrease the size of modifying expression in C programming
a=a+10 can be written as a+=10
where += is the compound assignment operator.
In how many ways we can use & operator?
As address operator(unary)
As a bitwise operator(binary)
What is the use of shift operator?
Used to shift the binary bits in the memory.
What is sizeof() operator?
Used to find out the size of the variable, expression, array, pointer and so on.
What is the ternary operator?
Performs an operation on 3 operands.
What is the conditional operator?
It is a ternary operator.
Evaluates expressions based on the specified condition