Skip to main content

Pointer — Part 1 MCQs with Explanations

Practice high-yield Programming & Software Development MCQs on Pointer — 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 purpose of the 'free' function in C when used with pointers?

Question 2 of 40
★ FPSC ★ PPSC

Determine Output: void main() { char far *farther, *farthest; printf("%d..%d", sizeof(farther), sizeof(farthest)); }

Question 3 of 40
★ FPSC ★ PPSC

Determine Output: main() { char *str1 = "abcd"; char str2[] = "abcd"; printf("%d %d %d", sizeof(str1), sizeof(str2), sizeof("abcd")); }

Question 4 of 40
★ FPSC ★ PPSC

Choose the best answer. Prior to using a pointer variable

Question 5 of 40
★ FPSC ★ PPSC

Comment on the following pointer declaration? int * ptr, p;

Question 6 of 40
★ FPSC ★ PPSC

What will be the output? main() { char *p; p = "Hello"; printf("%cn",*&*p); }

Question 7 of 40
★ FPSC ★ PPSC

Determine output: #include <stdio.h> void main() { char *p = NULL; char *q = 0; if(p) printf(" p "); else printf("nullp"); if(q) printf("q"); else printf(" nullq"); }

Question 8 of 40
★ FPSC ★ PPSC

What will be the output of the following program? #include<stdio.h> void main() { int i = 10; void *p = &i; printf("%d\n", (int)*p); }

Question 9 of 40
★ FPSC ★ PPSC

Comment on the following? const int * ptr;

Question 10 of 40
★ FPSC ★ PPSC

Determine Output: #include<stdio.h> void main() { int *ptr, a=10; ptr = &a; *ptr += 1; printf("%d, %d", *ptr, a); }

Question 11 of 40
★ FPSC ★ PPSC

A function 'p' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as

Question 12 of 40
★ FPSC ★ PPSC

What will be printed after compiling and running the following code? main() { char *p; printf("%d %d",sizeof(*p), sizeof(p)); }

Question 13 of 40
★ FPSC ★ PPSC

Find the output of the following program. void main() { int array[10]; int *i = &array[2], *j = &array[5]; int diff = j-i; printf("%d", diff); }

Question 14 of 40
★ FPSC ★ PPSC

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

Question 15 of 40
★ FPSC ★ PPSC

Find the output of the following program. void main() { int i=10; /* assume address of i is 0x1234ABCD */ int *ip=&i; int **ipp=&&i; printf("%x,%x,%x", &i, ip, *ipp); }

Question 16 of 40
★ FPSC ★ PPSC

Which of the following statements are true after execution of the program. void main() { int a[10], i, *p; a[0] = 1; a[1] = 2; p = a; (*p)++; }

Question 17 of 40
★ FPSC ★ PPSC

In C, what is a pointer primarily used for?

Question 18 of 40
★ FPSC ★ PPSC

What is the result of the expression sizeof(int*) in C, assuming an int pointer on a typical system?

Question 19 of 40
★ FPSC ★ PPSC

In C, how do you declare a pointer variable that can store the address of an integer?

Question 20 of 40
★ FPSC ★ PPSC

What is the purpose of the '->' operator in C when used with pointers?

Question 21 of 40
★ FPSC ★ PPSC

In C, what is the value of a pointer variable if it hasn't been assigned any address?

Question 22 of 40
★ FPSC ★ PPSC

What is the result of the expression *ptr in C, where ptr is a pointer to an int?

Question 23 of 40
★ FPSC ★ PPSC

In C, what is the purpose of the 'void' pointer type (void*)?

Question 24 of 40
★ FPSC ★ PPSC

How do you declare a pointer to a function that takes two integers and returns an integer in C?

Question 25 of 40
★ FPSC ★ PPSC

What is the result of the expression ptr++ in C, where ptr is a pointer?

Question 26 of 40
★ FPSC ★ PPSC

In C, what is the purpose of the 'const' keyword when used with a pointer declaration?

Question 27 of 40
★ FPSC ★ PPSC

What is the result of the expression &variable in C, where variable is a variable of type int?

Question 28 of 40
★ FPSC ★ PPSC

In C, what is a double pointer (int**)?

Question 29 of 40
★ FPSC ★ PPSC

What is the result of the expression ptr = NULL in C, where ptr is a pointer?

Question 30 of 40
★ FPSC ★ PPSC

In C, what is the purpose of the 'malloc' function?

Question 31 of 40
★ FPSC ★ PPSC

What is the result of the expression *NULL in C?

Question 32 of 40
★ FPSC ★ PPSC

In C, what is the purpose of the 'memcpy' function?

Question 33 of 40
★ FPSC ★ PPSC

What is the result of the expression sizeof(char*) in C, assuming a char pointer on a typical system?

Question 34 of 40
★ FPSC ★ PPSC

In C, how do you declare an array of pointers to integers?

Question 35 of 40
★ FPSC ★ PPSC

In C, what is a pointer to a constant value (const int*)?

Question 36 of 40
★ FPSC ★ PPSC

In C, what is a function pointer?

Question 37 of 40
★ FPSC ★ PPSC

What is the result of the expression &array[0] in C, where array is an integer array?

Question 38 of 40
★ FPSC ★ PPSC

In C, what is a null pointer (NULL or 0)?

Question 39 of 40
★ FPSC ★ PPSC

What is the result of the expression ptr += 2 in C, where ptr is a pointer?

Question 40 of 40
★ FPSC ★ PPSC

In C, what is the purpose of the 'calloc' function?

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