Skip to main content

Operators And Expressions — Part 2 MCQs with Explanations

Practice high-yield Programming & Software Development MCQs on Operators And Expressions — Part 2 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
Question 1 of 40
★ FPSC ★ PPSC

Find the output of the following program. #include<stdio.h> void main() { int y=10; if(y++>9 && y++!=11 && y++>11) printf("%d", y); else printf("%d", y); }

Question 2 of 40
★ FPSC ★ PPSC

Choose the correct output for the following program. #include<stdio.h> void main() { int a=10, b=11, c=13, d; d = (a=c, b+=a, c=a+b+c); printf("%d %d %d %d", d, a, b, c); }

Question 3 of 40
★ FPSC ★ PPSC

Which operator from the following has the lowest priority?

Question 4 of 40
★ FPSC ★ PPSC

Identify the correct output of the following code: void main() { int w=10, x=5, y=3, z=3; if( (w < x ) && (y=z++) ) printf("%d %d %d %d", w, x, y, z); else printf("%d %d %d %d", w, x, y, z); }

Question 5 of 40
★ FPSC ★ PPSC

Given b=110 and c=20 , what is the value of 'a' after execution of the expression a=b-=c*=5?

Question 6 of 40
★ FPSC ★ PPSC

what will be the output when following code is executed? void main() { int a=10, b; b = a++ + ++a; printf("%d %d %d %d", b, a++, a, ++a); }

Question 7 of 40
★ FPSC ★ PPSC

Which among the following is never possible as an output for a float?

Question 8 of 40
★ FPSC ★ PPSC

Which of the following cannot be used inside sizeof?

Question 9 of 40
★ FPSC ★ PPSC

In C programming language, which of the following type of operators have the highest precedence

Question 10 of 40
★ FPSC ★ PPSC

Which of the following comments about the ++ operator are correct?

Question 11 of 40
★ FPSC ★ PPSC

Determine output of the following program code. #include<stdio.h> void main() { int a, b=7; a = b<4 ? b<<1 : ++b>4 ? 7>>1 : a; printf("%d %d", a, b); }

Question 12 of 40
★ FPSC ★ PPSC

Consider the following program fragment, and choose the correct one. void main() { int a, b = 2, c; a = 2 * (b++); c = 2 * (++b); }

Question 13 of 40
★ FPSC ★ PPSC

Which among the following statement is right?

Question 14 of 40
★ FPSC ★ PPSC

What will be the output of the following C code? #include <stdio.h> int main() { float a = 2.455555555555; printf("%f", a); }

Question 15 of 40
★ FPSC ★ PPSC

Which of the following % operation is invalid?

Question 16 of 40
★ FPSC ★ PPSC

In the following C code, the union size is decided by? union temp { char a; int b; float c; };

Question 17 of 40
★ FPSC ★ PPSC

Modulus for float could be achieved by?

Question 18 of 40
★ FPSC ★ PPSC

Which among the following has the highest precedence?

Question 19 of 40
★ FPSC ★ PPSC

%f access specifier is used for . . . . . . . .

Question 20 of 40
★ FPSC ★ PPSC

What will be the output of the following C code? #include <stdio.h> printf("%d", sizeof('a'));

Question 21 of 40
★ FPSC ★ PPSC

Loss in precision occurs for typecasting from. . . . . . . .

Question 22 of 40
★ FPSC ★ PPSC

What will be the output of the following C code? #include <stdio.h> union temp { char a; char b; int c; }t; int main() { printf("%d", sizeof(t)); return 0; }

Question 23 of 40
★ FPSC ★ PPSC

Select the odd one out with respect to type?

Question 24 of 40
★ FPSC ★ PPSC

Predict the data type of the following mathematical operation? 2 * 9 + 3 / 2 . 0

Question 25 of 40
★ FPSC ★ PPSC

How many digits are present after the decimal in float value?

Question 26 of 40
★ FPSC ★ PPSC

What is the size of float in a 32-bit compiler?

Question 27 of 40
★ FPSC ★ PPSC

Size of an array can be evaluated by . . . . . . . . (Assuming array declaration int a[10];)

Question 28 of 40
★ FPSC ★ PPSC

What type of value does sizeof return?

Question 29 of 40
★ FPSC ★ PPSC

Which among the following is never possible in C when members are different in a structure and union? //Let P be a structure //Let Q be a union

Question 30 of 40
★ FPSC ★ PPSC

What will be the size of the following C structure? #include <stdio.h> struct temp { int a[10]; char p; };

Question 31 of 40
★ FPSC ★ PPSC

What is the sizeof(void) in a 32-bit C?

Question 32 of 40
★ FPSC ★ PPSC

Which data type is suitable for storing a number like? 10.0000000001

Question 33 of 40
★ FPSC ★ PPSC

In a 32-bit compiler, which 2 types have the same size?

Question 34 of 40
★ FPSC ★ PPSC

What will be the output of the following C code? #include <stdio.h> printf("%d", sizeof(strlen("HELLOWORLD")));

Question 35 of 40
★ FPSC ★ PPSC

What will be the output of the following C code? #include <stdio.h> printf("%.0f", 2.89);

Question 36 of 40
★ FPSC ★ PPSC

What is the sizeof(char) in a 32-bit C compiler?

Question 37 of 40
★ FPSC ★ PPSC

What will be the output of the following C code? #include <stdio.h> (sizeof double = 8, float = 4, void = 1) #define PI 3.14 int main() { printf("%d", sizeof(PI)); }

Question 38 of 40
★ FPSC ★ PPSC

What will be the output of the following C code? #include <stdio.h> main() { int a = 1; printf("size of a is %d, ", sizeof(++a)); printf("value of a is %d", a); };

Question 39 of 40
★ FPSC ★ PPSC

Which of the following is not an operator in C?

Question 40 of 40
★ FPSC ★ PPSC

%lf is used to display?

✓ Link copied to clipboard
Continue Your Practice

Advance Html — Part 1

Master the next curriculum module with 40 exam-standard MCQs.

Next Practice Set →

💡 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.

More Modules in Programming & Software Development

View All →
📚

Study Guides

Topic summaries and syllabus breakdown

Explore Guides →
🎯

Complete Library

Search through 78,000+ verified MCQs

Browse Library →
📱

Mobile App

Offline mock tests and instant bookmarks

Get Mobile App →