Programming - Operators
You Are Here :: Home > JAVA > Operators - General Questions
13.
Which expression, a value is incremented first then this new value is restored back to the variable?
A.
postfix
B.
infix
C.
prefix
D.
all the above
Answer: Option C
Explanation:
prefix expression, a value is incremented first then this new value is restored back to the variable?
14.
Which expression the current value is assigned to a variable then it is incremented by1 and restored back to the original variable.
A.
infix
B.
postfix
C.
prefix
D.
both b and c
Answer: Option B
Explanation:
postfix expression the current value is assigned to a variable then it is incremented by1 and restored back to the original variable.
15.
The logical compliment (!) operator is also known as __________.
A.
Boolean Negation Operator
B.
Boolean Operator
C.
both a and b
D.
none
Answer: Option A
Explanation:
The logical compliment (!) operator is also known as Boolean Negation Operator.
16.
____________________ is used to invert the value of a boolean type operand i.e. the type of the operand must be boolean while using this operator
A.
logical compliment
B.
logical AND
C.
logical OR
D.
both a and b
Answer: Option A
Explanation:
logical compliment is used to invert the value of a boolean type operand i.e. the type of the operand must be boolean while using this operator
17.
The Equality operator "= =" differs from an ___________.
A.
Relational operator
B.
assignment operator "="
C.
logical operator
D.
increment operator
Answer: Option B
Explanation:
The Equality operator "= =" differs from an assignment operator "=" i.e. the equality operator is used to determine whether one operand is equal to another operand or not while the assignment operator is used to assign a value to a variable.
18.
All these operators are often used in the _____________.
A.
control structures
B.
control statements
C.
both a and b
D.
all the above
Answer: Option A
Explanation:
All these operators are often used in the control structures such as if, do, while with the conditional operators to make decisional expressions.
« prev
next »