Questions · Page 4 of 15

MCQ

MCQ 1511 Mark
Using which operator, the result of expression will be either true or false?
  • Comparison
  • B
    Arithmetic
  • C
    Increment
  • D
    Non-conditional
Answer
Correct option: A.
Comparison
Comparison
View full question & answer
MCQ 1521 Mark
What is the result of expression after applying comparison operator?
  • Boolean
  • B
    Char
  • C
    int
  • D
    Double
Answer
Correct option: A.
Boolean
Boolean
View full question & answer
MCQ 1531 Mark
For which of the following type, its Unicode numeric values are used in comparison?
  • A
    int
  • B
    Byte
  • C
    Double
  • Char
Answer
Correct option: D.
Char
Char
View full question & answer
MCQ 1541 Mark
Which type of values can comparison operators use to compare?
  • A
    Numerical
  • B
    Char type
  • 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 1561 Mark
Which Java statement is used to display variable A and variable B as not equal?
  • A
    A==B
  • B
    A<>B
  • C
    A B
  • A!= B
Answer
Correct option: D.
A!= B
A!= B
View full question & answer
MCQ 1571 Mark
Which Java statement is used to display variable A and variable B as equal?
  • A == B
  • B
    A;=B
  • C
    A = B
  • D
    A. B
Answer
Correct option: A.
A == B
A == B
View full question & answer
MCQ 1581 Mark
Which of the following are comparison operators (relational operators) in Java?
  • A
    <, >
  • B
    <, >
  • C
    =, !
  • All of these
Answer
Correct option: D.
All of these
All of these
View full question & answer
MCQ 1591 Mark
Which operator is also known as comparison operator?
  • Relational
  • B
    Logical
  • C
    Arithmetic
  • D
    Unary
Answer
Correct option: A.
Relational
Relational
View full question & answer
MCQ 1601 Mark
Which of the following are standalone statements?
  • A
    x++;
  • B
    ++x;
  • C
    — —x; and x— —;
  • All of these
Answer
Correct option: D.
All of these
All of these
View full question & answer
MCQ 1611 Mark
In how many terms of statement the increment and decrement operator is used, but the use of pre or post does not make any difference?
  • Single term
  • B
    More than one
  • C
    Three terms
  • D
    Two terms
Answer
Correct option: A.
Single term
Single term
View full question & answer
MCQ 1621 Mark
What will be the values of x and y after executing y = 4 + — — x; if value of x is 3?
  • A
    6, 2
  • B
    3, 6
  • 2, 6
  • D
    4, 4
Answer
Correct option: C.
2, 6
2, 6
View full question & answer
MCQ 1631 Mark
What will be the values of x and y after executing y = 4 + x — —; if value of x is 3?
  • 2, 7
  • B
    6, 2
  • C
    4, 7
  • D
    4, 8
Answer
Correct option: A.
2, 7
2, 7
View full question & answer
MCQ 1641 Mark
What will be the values of x and y after executing y = 4 + ++x; if value of x is 3?
  • 4, 8
  • B
    4, 7
  • C
    3, 7
  • D
    3, 4
Answer
Correct option: A.
4, 8
4, 8
View full question & answer
MCQ 1651 Mark
What will be the values of x and y after executing y = 4 + x++; if value of x is 3?
  • 4, 7
  • B
    3, 7
  • C
    3, 4
  • D
    4, 8
Answer
Correct option: A.
4, 7
4, 7
View full question & answer
MCQ 1661 Mark
What is it called when ++ or — — operator is used before variable name?
  • Pre-increment or Pre-decrement
  • B
    Binary decrement
  • C
    Post-increment or Post-decrement
  • D
    None of these
Answer
Correct option: A.
Pre-increment or Pre-decrement
Pre-increment or Pre-decrement
View full question & answer
MCQ 1671 Mark
In which of the following situations, the old value of variable is used while evaluating the expression and thereafter the value of variable is incremented or decremented?
  • Post-increment or Post-decrement
  • B
    Binary decrement
  • C
    Pre-increment or Pre-decrement
  • D
    None of these
Answer
Correct option: A.
Post-increment or Post-decrement
Post-increment or Post-decrement
View full question & answer
MCQ 1681 Mark
What is it called when _ _ operator is used after variable name?
  • Post-decrement
  • B
    Post-increment
  • C
    Pre-decrement
  • D
    Pre-increment
Answer
Correct option: A.
Post-decrement
Post-decrement
View full question & answer
MCQ 1691 Mark
What is it called when ++ operator is used after variable name?
  • Post-increment
  • B
    Pre-increment
  • C
    Pre-decrement
  • D
    Post-decrement
Answer
Correct option: A.
Post-increment
Post-increment
View full question & answer
MCQ 1701 Mark
On which of the following type of variables, the increment and decrement operators can be used?
  • A
    Integer
  • B
    Char
  • Both a and b
  • D
    Boolean
Answer
Correct option: C.
Both a and b
Both a and b
View full question & answer
MCQ 1711 Mark
Which of the following operator subtracts 1 from the variable?
  • _ _
  • B
    — — —
  • C
  • D
    ++
Answer
Correct option: A.
_ _
_ _
View full question & answer
MCQ 1731 Mark
Which operator is known as Unary operator — —?
  • Decrement operator
  • B
    Increment operator
  • C
    Logical operator
  • D
    None of these
Answer
Correct option: A.
Decrement operator
Decrement operator
View full question & answer
MCQ 1741 Mark
Into which data type operand the values are promoted while evaluating an expression?
  • Higher
  • B
    Always in positive number
  • C
    Lower
  • D
    Always in negative number
Answer
Correct option: A.
Higher
Higher
View full question & answer
MCQ 1751 Mark
Into which data type will the result of System.out.println (“a/x=” +(a/x)) be; when a = 12.5 and x 4?
  • Float
  • B
    Char
  • C
    Int
  • D
    Not Possible
Answer
Correct option: A.
Float
Float
View full question & answer
MCQ 1761 Mark
What will be the result of System.out.println (“x +y=” +x +y); whenx6andy=4?
  • x + y=10
  • B
    x + y=64
  • C
    x + y=xy
  • D
    x +y=x + y
Answer
Correct option: A.
x + y=10
x + y=10
View full question & answer
MCQ 1771 Mark
What will be the result of System.out.println (“x + y =” + x + y); whenx6andy4?
  • x + y=64
  • B
    x + y =10
  • C
    x + y=xy
  • D
    x + y=x + y
Answer
Correct option: A.
x + y=64
x + y=64
View full question & answer
MCQ 1841 Mark
Which operator is used to concatenate argument and string in System.out.println0?
  • +
  • B
    :
  • C
    .
  • D
    ++
Answer
Correct option: A.
+
+
View full question & answer
MCQ 1851 Mark
Which of the following method merely prints a message to the standard output device?
  • A
    System.out.println2
  • System.out.println0
  • C
    main0
  • D
    System.println0
Answer
Correct option: B.
System.out.println0
System.out.println0
View full question & answer
MCQ 1861 Mark
Which of the following are implicit type conversions?
  • A
    Lower range data type value is converted into higher range data type.
  • B
    When operator + is applied with one of the operand of type string, other operand is converted into type string.
  • 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 1871 Mark
Into which type is other operand automatically converted when operator + is applied with one of the operand of type String?
  • String
  • B
    Long
  • C
    Char
  • D
    int
Answer
Correct option: A.
String
String
View full question & answer
MCQ 1911 Mark
In Java, what is the result when % operator is used with floating point data types?
  • Remainder after integer quotient
  • B
    Integer quotient
  • C
    Real quotient
  • D
    None of these
Answer
Correct option: A.
Remainder after integer quotient
Remainder after integer quotient
View full question & answer
MCQ 1921 Mark
With modulus operator %, what is the result j its first operand is negative? —
  • Negative
  • B
    Zero
  • C
    a or b
  • D
    Positive
Answer
Correct option: A.
Negative
Negative
View full question & answer
MCQ 1931 Mark
What is known as conversion in which lower range data type is converted to higher range data type?
  • Promotion
  • B
    Decrement
  • C
    Increment
  • D
    Demotion
Answer
Correct option: A.
Promotion
Promotion
View full question & answer
MCQ 1951 Mark
Which number is a quotient after operation in a Modulus (%) operator?
  • Integer
  • B
    Real
  • C
    Negative integer
  • D
    None of these
Answer
Correct option: A.
Integer
Integer
View full question & answer
MCQ 1961 Mark
What does Modulus (%) operator state?
  • Remainder
  • B
    Quotient
  • C
    Divisor
  • D
    Divisible
Answer
Correct option: A.
Remainder
Remainder
View full question & answer
MCQ 1971 Mark
With char type of data, which number is considered as its value when it is used with an arithmetic operator?
  • Unicode
  • B
    ANSI
  • C
    ASCII
  • D
    EBCDIC
Answer
Correct option: A.
Unicode
Unicode
View full question & answer
MCQ 1981 Mark
Which type of number is to be considered for the value of ‘char’ type as an arithmetic operator?
  • A
    Integer number
  • B
    Real number
  • C
    Positive Integer number
  • Negative Integer number
Answer
Correct option: D.
Negative Integer number
Negative Integer number
View full question & answer
MCQ 1991 Mark
With which values are Arithmetic operators used?
  • A
    Byte, short
  • B
    int’ long
  • C
    Float, double, char
  • All of these
Answer
Correct option: D.
All of these
All of these
View full question & answer
MCQ 2001 Mark
Which of the following operators are also used as Unary operator?
  • $+$ and $—$
  • B
    $*$ And
  • C
    $\%$
  • D
    All of these
Answer
Correct option: A.
$+$ and $—$
$+$ and $—$
View full question & answer
MCQ - Page 4 - COMPUTER STD 12 Science Questions - Vidyadip