adplus-dvertising

Welcome to the Operators and Control Statements MCQs Page

Dive deep into the fascinating world of Operators and Control Statements with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Operators and Control Statements, a crucial aspect of Java Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Operators and Control Statements, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within Java Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Operators and Control Statements. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of Java Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Operators and Control Statements. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Operators and Control Statements MCQs | Page 2 of 38

Explore more Topics under Java Programming

Q11.
Which right shift operator preserves the sign of the value?
Discuss
Answer: (b).>>
Discuss
Answer: (d).The right shift operator automatically fills the higher order bits with 0
Q13.
What is the output of this program?
    class bitwise_operator 
    {
        public static void main(String args[])
        {
            int var1 = 42;
            int var2 = ~var1;
            System.out.print(var1 + " " + var2);      
        } 
    }
Discuss
Answer: (c).42 -43
Q14.
What is the output of this program?
    class bitwise_operator 
    {
        public static void main(String args[]) 
        {    
             int a = 3;
             int b = 6;
       int c = a | b;
             int d = a & b;             
             System.out.println(c + " "  + d);
        } 
    }
Discuss
Answer: (a).7 2
Q15.
What is the output of relational operators?
Discuss
Answer: (b).Boolean
Q16.
Which of these is returned by β€œgreater than”, β€œless than” and β€œequal to” operators?
Discuss
Answer: (c).Boolean
Q17.
Which of the following operators can operate on a boolean variable?

1. &&

2. ==

3. ?:

4. +=
Discuss
Answer: (d).1, 2 & 3
Q18.
Which of these operators can skip evaluating right hand operand?

a.

!

b.

|

c.

&

d.

&&

Discuss
Answer: (d).&&
Discuss
Answer: (d).true and false are non numeric values
Q20.
What is the output of this program?
    class Relational_operator 
    {
        public static void main(String args[])
        {
            int var1 = 5; 
            int var2 = 6;
            System.out.print(var1 > var2);
        } 
    }
Discuss
Answer: (d).false

Suggested Topics

Are you eager to expand your knowledge beyond Java Programming? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!