Questions · Page 3 of 15

MCQ

MCQ 1011 Mark
By which of the following, the precedence rules can be overridden?
  • ( )
  • B
    { }
  • C
    < >
  • D
    [ ]
Answer
Correct option: A.
( )
( )
View full question & answer
MCQ 1021 Mark
How is the precedence of multiplication than addition in action of addition and multiplication?
  • More
  • B
    Negligible
  • C
    Less
  • D
    Same
Answer
Correct option: A.
More
More
View full question & answer
MCQ 1031 Mark
Which will be the first process in a + b * C 7
  • A
    a + b
  • b * c
  • C
    a * c
  • D
    a + c
Answer
Correct option: B.
b * c
b * c
View full question & answer
MCQ 1041 Mark
Which operator is operated first when two operators are having different priority?
  • Higher
  • B
    Lower
  • C
    Any
  • D
    None of these
Answer
Correct option: A.
Higher
Higher
View full question & answer
MCQ 1051 Mark
As what are the operators evaluated?
  • Priority of the operators
  • B
    Higher datatype in descending order
  • C
    Higher datatype in order
  • D
    None of these
Answer
Correct option: A.
Priority of the operators
Priority of the operators
View full question & answer
MCQ 1061 Mark
Which of the following statement is used to explicitly convert variable ‘a’ to a value of type short using type cast if variable ‘a’ is of type int and variable ‘b’ is of type short?
  • a = (short) b;
  • B
    b = (short) a:
  • C
    (Short) a = b;
  • D
    None of these
Answer
Correct option: A.
a = (short) b;
a = (short) b;
View full question & answer
MCQ 1071 Mark
What should we type in the parentheses before the value we want to convert?
  • Type-name
  • B
    Type-cast
  • C
    Value
  • D
    None of these
Answer
Correct option: A.
Type-name
Type-name
View full question & answer
MCQ 1081 Mark
What can we use for conversion that would not be done automatically?
  • A
    Short circuiting
  • B
    Shorthand operator
  • Typecast
  • D
    All of these
Answer
Correct option: C.
Typecast
Typecast
View full question & answer
MCQ 1091 Mark
Which of the following statement is equivalent to the statement q && p?
  • q=q && p
  • B
    p=q && p
  • C
    q=q + p
  • D
    q=p—q
Answer
Correct option: A.
q=q && p
q=q && p
View full question & answer
MCQ 1101 Mark
Which of the following statement is equivalent to the statement a +=b?
  • a=a + b
  • B
    b=a + b
  • C
    a=a * b
  • D
    a=b+1
Answer
Correct option: A.
a=a + b
a=a + b
View full question & answer
MCQ 1111 Mark
Which of the following are examples of shorthand assignment operator?
  • A
    a + = b
  • B
    a && = b
  • C
    a ++
  • Both a and b
Answer
Correct option: D.
Both a and b
Both a and b
View full question & answer
MCQ 1121 Mark
What can we use for conversion that would not be done automatically?
  • A
    Short circuiting
  • B
    Shorthand operator
  • Typecast
  • D
    All of these
Answer
Correct option: C.
Typecast
Typecast
View full question & answer
MCQ 1131 Mark
Which of the following statement is equivalent to the statement q && p?
  • q=q && p
  • B
    p=q && p
  • C
    q=q + p
  • D
    q=p—q
Answer
Correct option: A.
q=q && p
q=q && p
View full question & answer
MCQ 1141 Mark
Which of the following statement is equivalent to the statement a +=b?
  • a=a + b
  • B
    b=a + b
  • C
    a=a * b
  • D
    a=b+1
Answer
Correct option: A.
a=a + b
a=a + b
View full question & answer
MCQ 1151 Mark
Which of the following are examples of shorthand assignment operator?
  • A
    a + = b
  • B
    a && = b
  • C
    a ++
  • Both a and b
Answer
Correct option: D.
Both a and b
Both a and b
View full question & answer
MCQ 1161 Mark
How many operands does a shorthand assignment operator use?
  • A
    Three
  • B
    Four
  • Two
  • D
    One
Answer
Correct option: C.
Two
Two
View full question & answer
MCQ 1171 Mark
Which of the following operator should be a binary operator using two operand?
  • Shorthand assignment
  • B
    Short circuiting
  • C
    Assignment
  • D
    Boolean assignment
Answer
Correct option: A.
Shorthand assignment
Shorthand assignment
View full question & answer
MCQ 1181 Mark
Which of the following saves the typing time?
  • Shorthand assignment
  • B
    Short circuiting
  • C
    Assignment
  • D
    Boolean assignment
Answer
Correct option: A.
Shorthand assignment
Shorthand assignment
View full question & answer
MCQ 1191 Mark
From which of the following data type, there may not be automatic conversion?
  • A
    From smaller to larger datatype
  • B
    From double to float
  • C
    From int to short
  • All of these
Answer
Correct option: D.
All of these
All of these
View full question & answer
MCQ 1201 Mark
How is the data type of expression to the variable on left-hand side, so that it may result in an error due to precision problem?
  • Larger
  • B
    Medium
  • C
    Smaller
  • D
    Same
Answer
Correct option: A.
Larger
Larger
View full question & answer
MCQ 1211 Mark
Which of the following refers to location in memory?
  • Lvalue
  • B
    Mvalue
  • C
    Revalue
  • D
    Pvalue
Answer
Correct option: A.
Lvalue
Lvalue
View full question & answer
MCQ 1221 Mark
What is a variable called when it is on left-hand side of expression?
  • Lvalue
  • B
    Revalue
  • C
    Mvalue
  • D
    Pvalue
Answer
Correct option: A.
Lvalue
Lvalue
View full question & answer
MCQ 1231 Mark
What does it refer when a variable is used on the left-hand side of an assignment statement?
  • A
    File location
  • B
    Input location
  • Memory location
  • D
    Output location
Answer
Correct option: C.
Memory location
Memory location
View full question & answer
MCQ 1241 Mark
What does it refer when a variable is used in an expression on the right-hand side?
  • To the value stored in the variable
  • B
    To increase the value of the variable
  • C
    To assign value to the variable
  • D
    To decrease the value of the variable
Answer
Correct option: A.
To the value stored in the variable
To the value stored in the variable
View full question & answer
MCQ 1251 Mark
Which is the expression in the statement rate = 10.02f?
  • 10.02f
  • B
    F
  • C
    Rate
  • D
    =
Answer
Correct option: A.
10.02f
10.02f
View full question & answer
MCQ 1271 Mark
What does represent in an assignment syntax?
  • A
    Data value
  • B
    Calculation
  • Both a and b
  • D
    None of these
Answer
Correct option: C.
Both a and b
Both a and b
View full question & answer
MCQ 1281 Mark
When an assignment statement is executed, on which side of expression of sign it is first evaluated and on which side of expression of = sign the resulting data value is put into the variable?
  • Right, left
  • B
    Left, right
  • C
    Second from right, second from left
  • D
    None of these
Answer
Correct option: A.
Right, left
Right, left
View full question & answer
MCQ 1291 Mark
By using which operator we can assign a value to the variable, once that has been declared?
  • A
    = =
  • =
  • C
    ++
  • D
    !=
Answer
Correct option: B.
=
=
View full question & answer
MCQ 1301 Mark
Which operator contained by an expression is generally referred to as assignment statement?
  • =
  • B
    = =
  • C
    ++
  • D
    !=
Answer
Correct option: A.
=
=
View full question & answer
MCQ 1321 Mark
What will be the value of “next” variable in the expression next = (N % 2 == 0)? (N/2) (3*N+1) when value of N is odd number?
  • (3*N+1)
  • B
    NJ2)
  • C
    Error
  • D
    Any one
Answer
Correct option: A.
(3*N+1)
(3*N+1)
View full question & answer
MCQ 1331 Mark
What will be the value of “next” variable in the expression next = (N % 2 == 0)? (N/2): (3*N+1) when value of N is 8?
  • 4 (N/2)
  • B
    2
  • C
    25
  • D
    0
Answer
Correct option: A.
4 (N/2)
4 (N/2)
View full question & answer
MCQ 1341 Mark
Which value will be the value of entire expression if the value of first operand is true in the conditional operator?
  • A
    Third operand (expression 2)
  • Second operand (expression 1)
  • C
    Fourth operand (expression 3)
  • D
    Anyone
Answer
Correct option: B.
Second operand (expression 1)
Second operand (expression 1)
View full question & answer
MCQ 1351 Mark
Which is the first operand in the conditional operator?
  • Boolean
  • B
    Relational
  • C
    Arithmetic
  • D
    Increment
Answer
Correct option: A.
Boolean
Boolean
View full question & answer
MCQ 1361 Mark
Which symbols are used in expression to delimit three operands in the conditional operator?
  • ? and:
  • B
    :and;
  • C
    . and:
  • D
    ? an
Answer
Correct option: A.
? and:
? and:
View full question & answer
MCQ 1371 Mark
How many operands are there in the conditional operator?
  • Three
  • B
    Two
  • C
    Four
  • D
    One
Answer
Correct option: A.
Three
Three
View full question & answer
MCQ 1381 Mark
What kind of operator is the conditional operator in Java?
  • Ternary
  • B
    Binary
  • C
    Unary
  • D
    None of these
Answer
Correct option: A.
Ternary
Ternary
View full question & answer
MCQ 1391 Mark
Which expression is not evaluated if the value of x is zero in expression (x!0) && (y/x>1) and the evaluation has been short-circuited?
  • y/x > 1
  • B
    X != 0
  • C
    Both a and b
  • D
    None of these
Answer
Correct option: A.
y/x > 1
y/x > 1
View full question & answer
MCQ 1401 Mark
Which error would have been there for the value of x is zero in (x!=0) && (y/x>1) expression?
  • Division by zero
  • B
    Zero Division
  • C
    Not Possible
  • D
    Error
Answer
Correct option: A.
Division by zero
Division by zero
View full question & answer
MCQ 1411 Mark
In (x!0) && (y/x>1) expression, for which value of x, (x! = 0) results in false and there is no need to evaluate second sub-expression?
  • 0
  • B
    1
  • C
    2
  • D
    Non-zero
Answer
Correct option: A.
0
0
View full question & answer
MCQ 1421 Mark
In which of the following operator’s case, if first operand is true then there is no need to evaluate second operand?
  • | |
  • B
    &&
  • C
    Both a and b
  • D
    None of these
Answer
Correct option: A.
| |
| |
View full question & answer
MCQ 1431 Mark
Which operand is not needed to evaluate if first operand is false in case of &&?
  • Second
  • B
    First
  • C
    Not Possible
  • D
    None of these
Answer
Correct option: A.
Second
Second
View full question & answer
MCQ 1441 Mark
Give the full form of XOR.
  • Exclusive OR
  • B
    Examined or
  • C
    Extended OR
  • D
    Example OR
Answer
Correct option: A.
Exclusive OR
Exclusive OR
View full question & answer
MCQ 1451 Mark
Which of the following are logical operators in Java?
  • A
    And
  • B
    Or, Xor
  • C
    Not
  • All of these
Answer
Correct option: D.
All of these
All of these
View full question & answer
MCQ 1461 Mark
Which type of operators are logical operators as they operate on Boolean operands?
  • A
    Increment
  • Boolean
  • C
    Conditional
  • D
    Arithmetic
Answer
Correct option: B.
Boolean
Boolean
View full question & answer
MCQ 1471 Mark
Which operators are also called Logical operators?
  • Boolean
  • B
    Conditional
  • C
    Arithmetic
  • D
    Increment
Answer
Correct option: A.
Boolean
Boolean
View full question & answer
MCQ 1481 Mark
Which of the following operators are used to compare Boolean values?
  • A
    = =
  • B
    !
  • Both a and b
  • D
    None of these
Answer
Correct option: C.
Both a and b
Both a and b
View full question & answer
MCQ 1491 Mark
Where are relational operators used usually?
  • A
    In the if statements
  • B
    In the Loop
  • Both a and b
  • D
    None of these
Answer
Correct option: C.
Both a and b
Both a and b
View full question & answer
MCQ 1501 Mark
Which of the following expressions are also called Boolean -valued expressions?
  • Comparison
  • B
    Arithmetic
  • C
    Increment
  • D
    Non-conditional
Answer
Correct option: A.
Comparison
Comparison
View full question & answer
MCQ - Page 3 - COMPUTER STD 12 Science Questions - Vidyadip