Title  

Which of the following can be operands of arithmetic operatorsWhich of the following can be operands of arithmetic operators?
The answer is:
D. Both Numeric & Characters


Modulus operator, %, can be applied to which of theseModulus operator, %, can be applied to which of these?
The answer is:
C. Both Integers and floating – point numbers


With x = 0, which of the following are legal lines of Java code for changing the value of x to 1With x = 0, which of the following are legal lines of Java code for changing the value of x to 1?
The answer is:
C. 1, 2, 3 & 4


Decrement operator, −−, decreases the value of variable by what numberDecrement operator, −−, decreases the value of variable by what number?
The answer is:
A. 1


Which of these statements are incorrectWhich of these statements are incorrect?
The answer is:
D. None of the mentioned


What is the output of this programWhat is the output of this program
The answer is:
C. 1.5 1


What is the output of this programWhat is the output of this program?
The answer is:
A. 5.640000000000001 5


Which of these is not a bitwise operator 

Which operator is used to invert all the digits in a binary representation of a numberWhich operator is used to invert all the digits in a binary representation of a number?
The answer is:
A. ~


On applying Left shift operator, <<, on integer bits are lost one they are shifted past which position bitOn applying Left shift operator, <<, on integer bits are lost one they are shifted past which position bit?
The answer is:
D. 31


Which right shift operator preserves the sign of the valueWhich right shift operator preserves the sign of the value?
The answer is:
B. >>


Which of these statements are incorrectWhich of these statements are incorrect?
The answer is:
D. The right shift operator automatically fills the higher order bits with 0


What is the output of this programWhat is the output of this program?
The answer is:
C. 42 43


What is the output of this programWhat is the output of this program?
The answer is:
A. 7 2


What is the output of relational operatorsWhat is the output of relational operators?
The answer is:
B. Boolean


Which of these is returned by “greater than”, “less than” and “equal to” operatorsWhich of these is returned by “greater than”, “less than” and “equal to” operators?
The answer is:
C. Boolean


Which of the following operators can operate on a boolean variableWhich of the following operators can operate on a boolean variable? 1. &&
The answer is:
D. 1, 2 & 3


Which of these operators can skip evaluating right hand operandWhich of these operators can skip evaluating right hand operand?
The answer is:
D. &&


Which of these statements is correctWhich of these statements is correct?
The answer is:
D. true and false are non numeric values


What is the output of this programWhat is the output of this program
The answer is:
D. false

MCQs
Views
Best Answers
Points