Quiz Discussion

Decrement operator, −−, decreases the value of variable by what number?

Course Name: Java

  • 1]

    1

  • 2]

    2

  • 3]

    3

  • 4]

    4

Solution
No Solution Present Yet

Top 5 Similar Quiz - Based On AI&ML

Quiz Recommendation System API Link - https://fresherbell-quiz-api.herokuapp.com/fresherbell_quiz_api

# Quiz
1
Discuss

 What is the value stored in x in the following lines of Java code?

   int x, y, z;
    x = 0;
    y = 1;
    x = y = z = 8;
  • 1]

    0

  • 2]

    1

  • 3]

    9

  • 4]

    8

Solution
2
Discuss

Which of these statements are incorrect?

  • 1]

    Equal to operator has least precedence

  • 2]

    Brackets () have highest precedence

  • 3]

    Division operator, /, has higher precedence than multiplication operato

  • 4]

    Addition operator, +, and subtraction operator have equal precedence

Solution
3
Discuss

Which of the following can be operands of arithmetic operators?

  • 1]

    Numeric

  • 2]

    Boolean

  • 3]

    Characters

  • 4]

    Both Numeric & Characters

Solution
4
Discuss

Which right shift operator preserves the sign of the value?

  • 1]

    <<

  • 2]

    >>

  • 3]

    <<=

  • 4]

    >>=

Solution
5
Discuss

What will be the output of the following Java program?

    class rightshift_operator 
    {
        public static void main(String args[]) 
        {    
             int x; 
             x = 10;
             x = x >> 1;
             System.out.println(x);
        } 
    }

 

  • 1]

    10

  • 2]

    5

  • 3]

    2

  • 4]

    20

Solution
6
Discuss

Modulus operator, %, can be applied to which of these?

  • 1]

    Integers

  • 2]

    Floating – point numbers

  • 3]

    Both Integers and floating – point numbers

  • 4]

    None of the mentioned

Solution
7
Discuss

Which of these is returned by “greater than”, “less than” and “equal to” operators?

  • 1]

    Integers

  • 2]

    Floating – point numbers

  • 3]

    Boolean

  • 4]

    None of the mentioned

Solution
8
Discuss

Can 8 byte long data type be automatically type cast to 4 byte float data type?

  • 1]

    true

  • 2]

    false

Solution
9
Discuss

Which of these statements is correct?

  • 1]

    true and false are numeric values 1 and 0

  • 2]

    true and false are numeric values 0 and 1

  • 3]

    true is any non zero value and false is 0

  • 4]

    true and false are non numeric values

Solution
10
Discuss

Which of these operators can skip evaluating right hand operand?

  • 1]

    !

  • 2]

    |

  • 3]

    &

  • 4]

    &&

Solution
# Quiz