Operators — Part 1 MCQs with Explanations
Practice high-yield Programming & Software Development MCQs on Operators — Part 1 with worked academic solutions for FPSC, PPSC, NTS, NITB, PTS.
Questions
40
Difficulty Level
Exam-Level
Target Exams
FPSC, PPSC, NTS...
Estimated Time
48 mins
Exam-Level FPSC PPSC NTS NITB PTS
Verified for Commission Syllabus • Oct 14, 2026
40
Verified Practice Questions
Interactive test mode with detailed academic worked solutions
Live Progress | 0/40 answered
✓ 0 correct
✗ 0 wrong
0% score
🎉 Set complete! All 40 questions answered.
Question 1 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Question 2 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of the expression 5 | 3 in Java?
Question 3 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the value of the expression 6 > 4 ? 10 : 20 in Java?
Question 4 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of the expression 3 << 2 in Java?
Question 5 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of the expression 4 * 2 + 3 in Java?
Question 6 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of the expression 1 << 3 in Java?
Question 7 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of the expression (6 + 3) * 2 in Java?
Question 8 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following is the correct expression that evaluates to true if the number x is between 1 and 100 or the number is negative?
Question 9 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What will be the output? public class Test{ public static void main(String args[]){ int a = 42; double b = 42.25; System.out.print((a%10)+" "+(b%10)); } }
Question 10 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What will be the output after compiling and running following code? public class Test{ public static void main(String... args){ int x =5; x *= 3 + 7; System.out.println(x); } }
Question 11 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Determine output: public class Test{ public static void main(String... args){ int a=5 , b=6, c=7; System.out.println("Value is "+ b + c); System.out.println(a + b + c); System.out.println("String " + (b+c)); } }
Question 12 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What will be the output for the below code? class A{ public void printValue(){ System.out.println("A"); } } class B extends A{ public void printValue(){ System.out.println("B"); } } public class Test{ public static void main(String... args){ A b = new B(); newValue(b); } public static void newValue(A a){ if(a instanceof B){ ((B)a).printValue(); } } }
Question 13 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Determine output: public class Test{ static int i = 5; public static void main(String... args){ System.out.println(i++); System.out.println(i); System.out.println(++i); System.out.println(++i+i++); } }
Question 14 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following is not a valid jump statement?
Question 15 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of the expression 5 + 3 * 2 in Java?
Question 16 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which operator is used for division in Java?
Question 17 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the value of the expression 7 % 3 in Java?
Question 18 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following is a unary operator in Java?
Question 19 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of the expression true && false in Java?
Question 20 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the value of the expression 5 + 2 == 7 && 4 > 3 in Java?
Question 21 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which operator is used for logical NOT in Java?
Question 22 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which operator is used to perform bitwise XOR in Java?
Question 23 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the value of the expression true || false in Java?
Question 24 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of the expression 10 > 5 ? 2 : 1 in Java?
Question 25 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which operator is used for string concatenation in Java?
Question 26 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which operator is used for exponentiation in Java?
Question 27 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the value of the expression 9 % 4 in Java?
Question 28 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following is a bitwise operator in Java?
Question 29 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of the expression 8 / 4 in Java?
Question 30 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the value of the expression false || true in Java?
Question 31 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the value of the expression 8 < 6 ? 4 : 2 in Java?
Question 32 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which operator is used for bitwise NOT in Java?
Question 33 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the value of the expression true && true in Java?
Question 34 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of the expression 7 / 0 in Java?
Question 35 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which operator is used to perform logical AND in Java?
Question 36 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the value of the expression false && false in Java?
Question 37 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
int x = 0, y = 0 , z = 0 ; x = (++x + y-- ) * z++; What will be the value of "x" after execution ?
Question 38 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
int ++a = 100 ; System.out.println( ++a ) ; What will be the output of the above fraction of code ?
Question 39 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the output of the following program? class Numbers{ public static void main(String args[]){ int a=20, b=10; if((a < b) && (b++ < 25)){ System.out.println("This is any language logic"); } System.out.println(b); } }
Question 40 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Select from among the following character escape code which is not available in Java.
✓ Link copied to clipboard
Continue Your Practice
Next Practice Set → Advance Html — Part 1
Master the next curriculum module with 40 exam-standard MCQs.
💡 Examiner's Advisory for Programming & Software Development
In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.