Skip to main content

C Fundamentals — Part 1 MCQs with Explanations

Practice high-yield Programming & Software Development MCQs on C Fundamentals — 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
Question 1 of 40
★ FPSC ★ PPSC

What is the primary purpose of a function prototype in C?

Question 2 of 40
★ FPSC ★ PPSC

Which character is used to indicate the end of a statement in C?

Question 3 of 40
★ FPSC ★ PPSC

Which data type is used to represent a single character in C?

Question 4 of 40
★ FPSC ★ PPSC

What is the correct syntax for declaring a variable in C?

Question 5 of 40
★ FPSC ★ PPSC

Which symbol is used for the 'modulo' operation in C?

Question 6 of 40
★ FPSC ★ PPSC

What is the default return type of a function in C if not specified?

Question 7 of 40
★ FPSC ★ PPSC

Which operator is used for 'logical AND' in C?

Question 8 of 40
★ FPSC ★ PPSC

What is the purpose of the 'sizeof' operator in C?

Question 9 of 40
★ FPSC ★ PPSC

In C, which type of variable should be used to store decimal numbers?

Question 10 of 40
★ FPSC ★ PPSC

Which header file should be included for input and output functions in C?

Question 11 of 40
★ FPSC ★ PPSC

What is the purpose of the 'break' statement in C?

Question 12 of 40
★ FPSC ★ PPSC

Which of the following is not a valid C keyword?

Question 13 of 40
★ FPSC ★ PPSC

What is the maximum number of arguments that can be passed to a C function?

Question 14 of 40
★ FPSC ★ PPSC

Which operator is used to access the value stored at a pointer address in C?

Question 15 of 40
★ FPSC ★ PPSC

What does the 'void' keyword indicate in a C function declaration?

Question 16 of 40
★ FPSC ★ PPSC

Which character is used to represent a comment in C code?

Question 17 of 40
★ FPSC ★ PPSC

What is the purpose of the 'continue' statement in a loop?

Question 18 of 40
★ FPSC ★ PPSC

What is the range of values that can be stored in an 'int' data type in C?

Question 19 of 40
★ FPSC ★ PPSC

Which operator is used to compare two values for equality in C?

Question 20 of 40
★ FPSC ★ PPSC

Which data type is used to store a sequence of characters in C?

Question 21 of 40
★ FPSC ★ PPSC

In C, which operator is used for pointer-to-pointer relationships?

Question 22 of 40
★ FPSC ★ PPSC

For 16-bit compiler allowable range for integer constants is ________?

Question 23 of 40
★ FPSC ★ PPSC

C programs are converted into machine language with the help of

Question 24 of 40
★ FPSC ★ PPSC

Which one of the following is not a reserved keyword for C?

Question 25 of 40
★ FPSC ★ PPSC

A C variable cannot start with

Question 26 of 40
★ FPSC ★ PPSC

Which one of the following is not a valid identifier?

Question 27 of 40
★ FPSC ★ PPSC

What will be printed after execution of the following program code? main() { printf("\\nab"); printf("\\bsi"); printf("\\rha"); }

Question 28 of 40
★ FPSC ★ PPSC

If integer needs two bytes of storage, then maximum value of an unsigned integer is

Question 29 of 40
★ FPSC ★ PPSC

Which of the following is not a correct variable type?

Question 30 of 40
★ FPSC ★ PPSC

What number would be shown on the screen after the following statements of C are executed? char ch; int i; ch = 'G'; i = ch-'A'; printf("%d", i);

Question 31 of 40
★ FPSC ★ PPSC

Which of following is not a valid name for a C variable?

Question 32 of 40
★ FPSC ★ PPSC

Find the output of the following program. void main () { int i=01289; printf ( " %d ", i ) ; }

Question 33 of 40
★ FPSC ★ PPSC

Find the output of the following program. void main() { int i=065, j=65; printf("%d %d", i, j); }

Question 34 of 40
★ FPSC ★ PPSC

If ASCII value of 'x' is 120, then what is the value of the H, if H = ('x' – 'w' ) / 3;

Question 35 of 40
★ FPSC ★ PPSC

short testarray[4][3] = { {1}, {2,3}, {4,5,6}}; printf("%d", sizeof(testarray)); Assuming a short is two bytes long, what will be printed by the above code?

Question 36 of 40
★ FPSC ★ PPSC

What will be the output of the following C code? #include <stdio.h> void main() { int x = 97; char y = x; printf("%c\n", y); }

Question 37 of 40
★ FPSC ★ PPSC

What will be the final values of a and c in the following C statement? (Initial values: a = 2, c = 1) c = (c) ? a = 0 : 2;

Question 38 of 40
★ FPSC ★ PPSC

What will be the output of the following C code? #include <stdio.h> int main() { int x = 0, y = 2; int z = ~x & y; printf("%d\n", z); }

Question 39 of 40
★ FPSC ★ PPSC

What will be the final values of i and j in the following C code? #include <stdio.h> int x = 0; int f() { if (x == 0) return x + 1; else return x - 1; } int g() { return x++; } int main() { int i = (f() + g()) || g(); int j = g() || (f() + g()); }

Question 40 of 40
★ FPSC ★ PPSC

What will be the output of the following C code? #include <stdio.h> int main() { printf("Ram\rShyam\n"); return 0; }

✓ 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 →