0% found this document useful (0 votes)
8 views29 pages

Pointer MCQ (Free PDF) - Objective Question Answer For Pointer Quiz - Download Now!

The document provides a collection of multiple-choice questions (MCQs) focused on pointers in C and C++ programming, including topics like pointer arithmetic, arrays, and dynamic memory allocation. It emphasizes the importance of understanding these concepts for competitive exams related to computer programming. Additionally, detailed solutions and explanations are provided for each question to aid in learning and exam preparation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views29 pages

Pointer MCQ (Free PDF) - Objective Question Answer For Pointer Quiz - Download Now!

The document provides a collection of multiple-choice questions (MCQs) focused on pointers in C and C++ programming, including topics like pointer arithmetic, arrays, and dynamic memory allocation. It emphasizes the importance of understanding these concepts for competitive exams related to computer programming. Additionally, detailed solutions and explanations are provided for each question to aid in learning and exam preparation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

English Get Started

Home Programming and Data Structure Programming in C


Download Pointer MCQs Free P…
Pointer

Pointer MCQ Quiz - Objective Question with Answer for Pointer - Download Free PDF

Last updated on Sep 17, 2025

Pointer MCQs comprise multiple choice questions related to pointers, a crucial topic in computer programming,
particularly in C and C++. Important areas of focus include pointer basics, pointer arithmetic, pointers with arrays and
functions, and dynamic memory allocation. Familiarity with these topics can greatly facilitate in answering Pointer
MCQs. Candidates must prepare this key computer programming concept as several competitive exams, especially the
ones related to Computer-related govt. jobs have questions on the topic. Give a quick boost to your exam preparation
by solving Pointer MCQs with answers right away.

Latest Pointer MCQ Objective Questions


Pointer Question 1:

Only legal pointer operations:


A. pointer + number pointer
B. pointer - number number
C. pointer + pointer → pointer
D. pointer - pointer → pointer
E. pointer - pointer number
Choose the most appropriate answer from the options given below:

1. A, B, C Only

2. A, B, D Only

3. A, B Only

4. A, E Only

Answer (Detailed Solution Below)

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 1/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

Option 4 : A, E Only
English Get Started

India's Super Teachers for all


govt. exams Under One Roof
FREE Demo Classes Available*

Enroll For Free Now

Pointer Question 1 Detailed Solution

The correct answer is: Option 4) A, E Only

Key Rules of Pointer Arithmetic in C

Rule 1: pointer ± integer → pointer Adding or subtracting an integer from a pointer moves
it by that many elements (scaled by sizeof(*pointer)).
Rule 2: pointer − pointer → integer (ptrdiff_t) Subtracting two pointers gives the
number of elements between them, defined only when both pointers point into the same array (or
one past its end).
Rule 3: pointer + pointer is illegal in C; there is no meaning for “adding two addresses.”

Interpreting the statements A–E

A. pointer + number → pointer — Legal. Matches Rule 1.


B. pointer − number → number — Illegal as written. In C, pointer − integer produces a
pointer, not a number. (If this option had said “→ pointer,” it would be legal.)
C. pointer + pointer → pointer — Illegal. Adding two pointers is not allowed (violates Rule 3).
D. pointer − pointer → pointer — Illegal. Subtracting pointers yields an integer count, not a
pointer (violates Rule 2).
E. pointer − pointer → number — Legal. Matches Rule 2; result type is typically ptrdiff_t.

Mini examples

int a[10];
int *p = &a[3];
int *q = &a[7];

p + 2; /* legal: pointer to a[5] */


q - 3; /* legal: pointer to a[4] */
q - p; /* legal: value 4 (of type ptrdiff_t) */

p + q; /* illegal */

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 2/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

p - 2.0; /* illegal: RHS must be integer, not double */


p - q; /* legal, but result is an integer, not a pointer
English*/ Get Started

Conclusion

Only statements that conform to C’s pointer arithmetic are A and E. Hence, the most appropriate
answer is Option 4) A, E Only.

EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform

Start Complete Exam Preparation

Daily Live Practice Question Mock Tests &


MasterClasses Bank Quizzes

Get Started for Free

Pointer Question 2:

What is the output of the following code snippet?

#include

< stdio.in >

#define var 3

void main()

short num [3] [2] (3, 6, 9, 12, 15, 18);

printf("%d %d", *(num+1) [1],

**(num+2));

1. 12 15

2. 15 12

3. 15 15

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 3/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

4. 12 12 English Get Started

Answer (Detailed Solution Below)

Option 1 : 12 15

Pointer Question 2 Detailed Solution

The correct answer is option 1) 12 15

Key Points
Array Definition: short num[3][2] = {3, 6, 9, 12, 15, 18};
This initializes a 2D array with:

num[0][0] = 3 num[0][1] = 6
num[1][0] = 9 num[1][1] = 12
num[2][0] = 15 num[2][1] = 18

Expression 1: *(num + 1)[1]


num is a pointer to array of 2 short ints.
*(num + 1) points to num[1] → {9, 12}
*(num + 1)[1] → element at index 1 of num[1] → 12
Expression 2: **(num + 2)
num + 2 → pointer to num[2] → {15, 18}
*(num + 2) → num[2]
**(num + 2) → num[2][0] = 15

Additional Information
Memory Layout: The array is stored in row-major order in memory.
Pointer Arithmetic: In C, arrays decay to pointers, so num + i gives the address of the i-th row.
Access Pattern: *(num + 1)[1] is equivalent to num[1][1] and **(num + 2) is num[2][0].

Hence, the correct answer is: option 1) 12 15

EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform

Start Complete Exam Preparation

Daily Live Practice Question Mock Tests &


MasterClasses Bank Quizzes

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 4/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

Get Started for Free


English Get Started

Pointer Question 3:

What is the meaning of the following declaration in C programming language?

int (*p) [5];

1. It will result in compile error because there should not be any parenthesis, i.e., "int *p[5]" is valid

2. p is a pointer to 5 integers

3. p is a pointer to integer array

4. p is a pointer to an array of 5 integers

Answer (Detailed Solution Below)

Option 4 : p is a pointer to an array of 5 integers

Pointer Question 3 Detailed Solution

The correct answer is: Option 4) p is a pointer to an array of 5 integers

Explanation:

The given declaration is:

int (*p)[5];

Let's break this down:

The parentheses (*p) indicate that p is a pointer.


The brackets [5] outside the parentheses apply to what p points to.
So p is not an array of 5 pointers to int, but a pointer to an array of 5 integers.

Important Difference:

int *p[5]; → p is an array of 5 pointers to int


int (*p)[5]; → p is a pointer to an array of 5 integers

In this case, p can be used to reference a 1D array of 5 integers like this:


https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 5/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

int arr[5] = {1, 2, 3, 4, 5};


int (*p)[5] = &arr; English Get Started

✔️ Hence, the correct interpretation is: p is a pointer to an array of 5 integers

EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform

Start Complete Exam Preparation

Daily Live Practice Question Mock Tests &


MasterClasses Bank Quizzes

Get Started for Free

Pointer Question 4:

On a 32-bit machine if an int is 2 byte long and a float is 4 byte long, what will be the sizes
of ptr1 and ptr2?
int a, "ptr1;
float b, *ptr2:
ptr1 = &a;
pr2=&b:

1. 2 bytes, 4 bytes

2. 4 bytes, 4 bytes

3. 2 bytes, 2 bytes

4. 4 bytes, 2 bytes

Answer (Detailed Solution Below)

Option 2 : 4 bytes, 4 bytes

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 6/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

Pointer Question 4 Detailed Solution English Get Started

Correct Answer: Option 2) 4 bytes, 4 bytes

Key Points
On a 32-bit machine, the address space is 32 bits wide.
This means that any pointer (irrespective of what it points to: int, float, char, etc.) will require 4
bytes (32 bits) to store an address.
So even if int is 2 bytes and float is 4 bytes, the pointer variables that store their addresses still
take up 4 bytes.

Explanation of the Code:

int a, *ptr1;
float b, *ptr2;

ptr1 = &a;
ptr2 = &b;

ptr1 is a pointer to an int (2 bytes, but pointer needs 4 bytes to store address).
ptr2 is a pointer to a float (4 bytes, pointer also stores 32-bit address).

Therefore: Size of ptr1 = 4 bytes and Size of ptr2 = 4 bytes

Additional Information
Pointer size depends on the machine architecture, not on the data type it points to.
On a 64-bit machine, pointer sizes are usually 8 bytes.
Pointer arithmetic, memory allocation, and dereferencing all work based on the type pointed to,
but size in memory is fixed based on architecture.

EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform

Start Complete Exam Preparation

Daily Live Practice Question Mock Tests &


MasterClasses Bank Quizzes

Get Started for Free

Pointer Question 5:

What does the format specifier %10d in printf("%10d", num); do?

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 7/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

1. Prints the number with leading zeros in a field of 10 columns English Get Started

2. Prints the number in a field of 10 columns

3. Prints only the number without any extra spaces

4. Prints the number left-aligned in a field of 10 columns

Answer (Detailed Solution Below)

Option 2 : Prints the number in a field of 10 columns

Pointer Question 5 Detailed Solution

Explanation:

The format specifier %10d in the printf function is used to define the output formatting of an integer
variable in C programming. In this context, it specifies that the integer should be printed within a field
width of 10 characters. This means the number will be right-aligned within a space of 10 characters. If
the number has fewer than 10 digits, the extra spaces will be filled with spaces (not zeros) on the left
side. This is a common technique used to ensure that numbers are aligned properly in tabular data or
formatted output.

Correct Option:

The correct option is Option 2: Prints the number in a field of 10 columns. This option accurately
describes the behavior of the format specifier %10d. It ensures that the integer is displayed within a
field width of 10 characters, right-aligned, with any extra space on the left filled with spaces.

EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform

Start Complete Exam Preparation

Daily Live Practice Question Mock Tests &


MasterClasses Bank Quizzes

Get Started for Free

Top Pointer MCQ Objective Questions


https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 8/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

Pointer Question 6 English DownloadGet


Solution PDF
Started

Consider the following C program:

#include

int main ( )

int a[ ] = {2, 4, 6, 8, 10};

int i, sum = 0, *b = a + 4;

for (i = 0; i < 5; i++)

sum = sum + (*b - i) - *(b - i);

printf (“ % d \ n”, sum);

return 0;

The output of the above C program is ________.

Answer (Detailed Solution Below) 10

Pointer Question 6 Detailed Solution Download Solution PDF

integer pointer b points to 5th element of an static array a

*b = 10 // dereferencing

sum = 0 // initially

Values in loop sum = sum + (*b - i) - *(b - i);

sum = 0 + (10 - 0) - *(address_of_5th integer -


0)
i=0
= 10 - *(address_of_5th integer)

= 10 - 10 = 0

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 9/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

sum = 0 + (10 - 1) - *(address_of_5th integer - English Get Started


1)
i=1
= 0 + (10 - 1) - *(address_of_4th integer)

=9-8=1

sum = 1 + (10 - 2) - *(address_of_5th integer -


2)
i=2
= 1 + (10 - 2) - *(address_of_3rd integer)

=9-6=3

sum = 3 + (10 - 3) - *(address_of_5th integer -


3)
i=3
= 3 + (10 - 3) - *(address_of_2nd integer)

= 10 - 4 = 6

sum = 6 + (10 - 4) - *(address_of_5th


integer - 4)
i=4
= 6 + (10 - 4) - *(address_of_1st integer)

= 12 - 2 = 10

Download Solution PDF Share on Whatsapp

EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform

Start Complete Exam Preparation

Daily Live Practice Question Mock Tests &


MasterClasses Bank Quizzes

Get Started for Free

Pointer Question 7 Download Solution PDF

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 10/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

Consider the following C program.


English Get Started
# include

struct Ournode {

char x, y, z ;

};

int main ( ) {

struct Ournode p = {‘1’, ‘0’, ‘a’ + 2} ;

struct Ournode *q = &p;

printf (“%c, %c”, *( (char*) q + 1) , *( (char*) q + 2) ) ;

return 0 ;

The output of this program is:

1. 0, c

2. 0, a + 2

3. ‘0’, ‘a + 2’

4. ‘0’, ‘c’

Answer (Detailed Solution Below)

Option 1 : 0, c

Pointer Question 7 Detailed Solution Download Solution PDF

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 11/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

English Get Started

Character ‘a’ has ASCII value 97, adding 2 will result in 99, which is the ASCII value for ‘c’.

Hence dereferencing q + 1 and q + 2 will give 0 and c respectively.

char x = 'a' + 2, that is, x == 'c'

So, p={'1','0','c'};

*((char*)q+1) = *(address of data '1' + 1) = *(address of data '0') = 0;

*((char*)q + 2) = *(address of data '1' + 2) = *(address of data 'c') = c;

printf("%c, %c",*((char*)q+1),*((char*)q+2)) will print 0, c.

Download Solution PDF Share on Whatsapp

EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform

Start Complete Exam Preparation

Daily Live Practice Question Mock Tests &


MasterClasses Bank Quizzes

Get Started for Free

Pointer Question 8 Download Solution PDF

Consider the following C program:

#include

int main ( )

int arr [ ] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 5}, *ip = arr + 4;

printf (“ % d \n”, ip[1]);

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 12/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

return 0;
English Get Started
}

The number that will be displayed on execution of the program is _________.

Answer (Detailed Solution Below) 6

Pointer Question 8 Detailed Solution Download Solution PDF

int *ip = arr + 4 //ip is a integer pointer pointing to 5 element of the array

ip[1] = *(ip + 1xsizeofint) = *(address of 6th element) = 6

Download Solution PDF Share on Whatsapp

EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform

Start Complete Exam Preparation

Daily Live Practice Question Mock Tests &


MasterClasses Bank Quizzes

Get Started for Free

Pointer Question 9 Download Solution PDF

What is the output in a 32 bit machine with 32 bit compiler?

#include

rer(int **ptr2,int **ptr1)

int*ii;

ii=*ptr2;

*ptr2=*ptr1;

*ptr1=ii;
https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 13/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

**ptr1 *= **ptr2;
English Get Started
**ptr2 += **ptr1;

void main( )

int var1=5, var2=10;

int *ptr1=&var1, *ptr2=&var2;

rer(&ptr1, &ptr2);

printf(“%d %d “,var2, var1);

1. 60 70

2. 50 50

3. 50 60

4. 60 50

Answer (Detailed Solution Below)

Option 4 : 60 50

Pointer Question 9 Detailed Solution Download Solution PDF

Concept –

Suppose var1 var2 address


void main()
address 1000 2000

int var1=5, var2=10; var1 = 5 var2 = 10

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 14/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

ptr1 = 1000 ptr2 = 2000 English Get Started


int *ptr1=&var1,
(pointer storing (pointer storing
*ptr2=&var2;
address of var1) address of var2)

Call to the function describes in table


rer(&ptr1,, &ptr2);
below

rer(int **ptr2,int **ptr1) ii ptr2 ptr1 var1 var2

int* ii; - 1000 2000 5 10

ii = *ptr2; 1000 1000 2000 5 10

*ptr2 = *ptr1; 2000 2000 2000 5 10

*ptr1 = ii; 2000 2000 1000 5 10

5× 10
**ptr1 *= **ptr2 2000 2000 1000 10
= 50

**ptr2 += **ptr1; 2000 2000 1000 50 60

Hence, printf(“%d %d “,var2, var1); will print 60 and 50.

Download Solution PDF Share on Whatsapp

EE
FR
India’s #1 Learning Platform Trusted by 7.8 Crore+ Students

Start Complete Exam Preparation

Daily Live Practice Question Mock Tests &


MasterClasses Bank Quizzes

Get Started for Free

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 15/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

Pointer Question 10 English DownloadGet


Solution PDF
Started

Consider the following C program.

#include

int main ( )

static int a [ ] = {10, 20, 30, 40, 50} ;

static int *p [ ] = {a, a+3, a+4, a+1, a+2} ;

int **ptr = p;

ptr++;

printf(“%d%d”, ptr-p, **ptr) ;

The output of the program is _________

Answer (Detailed Solution Below) 140

Pointer Question 10 Detailed Solution Download Solution PDF

Concept:

Rule of pointer arithmetic: When two pointers are subtracted belonging to same array then result is
number of elements separating them.

Explanation:

Consider integer size as 2 bytes. Consider base address of array as 100.

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 16/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

Let array p base address is 200 and double ptr base address is 300
English Get Started
ptr++; // It points to address 202

ptr – p
address of ptr − address of p 202−200
= = 1
size of int 2

** ptr = ** 202 = * (a+3) = 40

printf(“%d%d”, ptr – p, **ptr) ;

It will print 140

Download Solution PDF Share on Whatsapp

EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform

Start Complete Exam Preparation

Daily Live Practice Question Mock Tests &


MasterClasses Bank Quizzes

Get Started for Free

Pointer Question 11 Download Solution PDF

Consider the following C function

#include
int main()
{

char c[] = "ICRBCSIT17";


char *p = c;
printf("%s",c + 2[p] - 6[p] - 1);
return 0;
}

The output of the program is

1. SI

2. IT

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 17/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

3. T1 English Get Started

4. 17

Answer (Detailed Solution Below)

Option 4 : 17

Pointer Question 11 Detailed Solution Download Solution PDF

Here, character array c will be stored to *p.

Address100101102103104105106107108109110

ElementI C R B C S I T 1 7 \0

Index 0 1 2 3 4 5 6 7 8 9 10
c = 100 (starting address of array)
2[p] = p[2] = R
6[p] = p[6] = I
c + 2[p] - 6[p] - 1
=c+R-I-1
ASCII value of A is 65. ASCII of R is 82 and ASCII value of I is 73
= 100 + 82 - 73 - 1 = 100 + 8 =108
Hence printf("%s", 108); will print 17 because %s will get all the values untill it gets NULL.

Download Solution PDF Share on Whatsapp

EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform

Start Complete Exam Preparation

Daily Live Practice Question Mock Tests &


MasterClasses Bank Quizzes

Get Started for Free

Pointer Question 12 Download Solution PDF

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 18/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

If, X, Y and Z are pointer variables of type char, int and float, respectively in 'C'
English Get Started
language, then which of the following statements is true?

1. Size of X, Y, and Z are same

2. Size of Z is greater than the size of X

3. size of Y is greater than the size of X

4. Size of Z is greater than the size of Y

Answer (Detailed Solution Below)

Option 1 : Size of X, Y, and Z are same

Pointer Question 12 Detailed Solution Download Solution PDF

Key Points
Given that,

char * x;

int * y;

float * z;

Then,

Size of x is= 2 Bytes

Size of y is= 2 Bytes

Size of z is= 2 Bytes

Important Point
The size of any type of pointer in C is equal to the size of the integer variable in that
system.
The values of pointer variables are unsigned integer numbers which are addresses of other
variables.
Thus, pointers to all types of data occupy the same size of memory because the value of a pointer
is the memory address – an unsigned integer.

Hence here all pointer sizes are the same.


https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 19/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

Hence the correct answer is Size of X, Y, and Z are the same.


English Get Started

Download Solution PDF Share on Whatsapp

EE
FR
India’s #1 Learning Platform Trusted by 7.8 Crore+ Students

Start Complete Exam Preparation

Daily Live Practice Question Mock Tests &


MasterClasses Bank Quizzes

Get Started for Free

Pointer Question 13 Download Solution PDF

What is the output of the following C code? Assume that the address of x is 2000 (in decimal) and an
integer requires four bytes of memory.

int main () {

unsigned int x[4][3] =

{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}};

printf(“%u, %u, %u”, x + 3, *(x + 3), *(x + 2) + 3);

1. 2036, 2036, 2036

2. 2012, 4, 2204

3. 2036, 10, 10

4. 2012, 4, 6

Answer (Detailed Solution Below)

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 20/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

Option 1 : 2036, 2036, 2036


English Get Started

Pointer Question 13 Detailed Solution Download Solution PDF

x is a 2-D array of arrays

Download Solution PDF Share on Whatsapp

EE
FR
India’s #1 Learning Platform Trusted by 7.8 Crore+ Students

Start Complete Exam Preparation

Daily Live Practice Question Mock Tests &


MasterClasses Bank Quizzes

Get Started for Free

Pointer Question 14 Download Solution PDF

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 21/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

What is the output of this C code? English Get Started

#include

void main()

int k = 5;

int *p = &k;

int **m = &p;

printf(“%d %d %d\n”, k, *p, **m);

1. 5 5 5

2. 5 5 junk

3. 5 junk junk

4. Compile time error

Answer (Detailed Solution Below)

Option 1 : 5 5 5

Pointer Question 14 Detailed Solution Download Solution PDF

k is an integer variable.

p is a pointer to an integer variable.

m is a pointer to a pointer variable to an integer.

%d tells printf that the corresponding argument is to be treated as an integer, so as k has value 5 and p
and m are dereferenced, 5 5 5 will be printed.

Download Solution PDF Share on Whatsapp

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 22/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

EE
FR English Get Started
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform

Start Complete Exam Preparation

Daily Live Practice Question Mock Tests &


MasterClasses Bank Quizzes

Get Started for Free

Pointer Question 15 Download Solution PDF

What is the output of this C program?

#include
void square (int *x)

{
*x = (*x)++ *(*x);
}
void square (int *x, int *y)
{
*x = (*x) * --(*y);
}
int main ( )
{
int number = 30;
square(&number, &number);
printf("%d",number);
return 0;
}

1. 910

2. 920

3. 870

4. 900

Answer (Detailed Solution Below)

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 23/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

Option 3 : 870
English Get Started

Pointer Question 15 Detailed Solution Download Solution PDF

The second definition of the square will be overloaded.

Because of square(&number, &number);

function square(int *x, int *y) will be called.

It has:

*x= (*x) * --(*y);

where *x = 30 and *y = 30

-- (decrement) operator has the higher precedence than * (multiplication).

Hence:

*x = 30 * 29

*x = 870

Download Solution PDF Share on Whatsapp

EE
FR
India’s #1 Learning Platform Trusted by 7.8 Crore+ Students

Start Complete Exam Preparation

Daily Live Practice Question Mock Tests &


MasterClasses Bank Quizzes

Get Started for Free

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 24/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

English Get Started

Exam Preparation
Simplified
Learn, practice, analyse and improve

Get Started for Free

Trusted by 7.8 Crore+ Students

Related MCQ

Character String MCQ

Storage Class MCQ

Switch Statement MCQ

Array MCQ

Ternary Operator MCQ

Call By Copy/Restore MCQ

If-then else Statement MCQ

While Loop MCQ

Call By Value MCQ

Scope of a Variable MCQ

Function Recursion MCQ

Call By Reference MCQ

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 25/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

English Get Started


Exams

RRB Group D 2025 UPSC Civil Services 2025 DFCCIL Executive UPSSSC Junior Assistant
SSC GD Constable UPSC NDA Bihar Primary Teacher OSSC CGL
SSC CGL CDS Exam Haryana CET Group D OSSC CHSL
SSC MTS CSIR NET 2025 EMRS TGT AIIMS CRE 2025
SSC CPO UPSC CAPF AC GATE Exam 2025 TNUSRB SI 2025
SSC CHSL UGC NET 2025 SSC Havaldar TS ICET 2025
SSC JE 2025 CTET 2025 Bihar Secondary Teacher RRB Section Controller
SSC Selection Post RBI Grade B Bihar Senior Secondary IB Junior Intelligence
IBPS RRB Clerk RBI Assistant Teacher Officer
RRB NTPC Indian Airforce Agniveer ACCA BPSC AEDO
RRB ALP 2025 Railway Teacher Bihar Jeevika
IBPS RRB PO SEBI Grade A JAIIB NHPC JE
IBPS PO Indian Army Agniveer 2025 CAIIB MP ASI Stenographer
IBPS Clerk UPSSSC VDO 2025 Patna High Court Mazdoor MP Police ASI
IBPS SO AFCAT BSSC Inter Level MP Police Constable
SBI PO SSC Stenographer Rajasthan Judiciary 2025 Delhi Police Driver
SBI Clerk Employment News PDF BSPHCL Correspondence TN TRB Assistant Professor
RRB JE RRB Staff Nurse 2024 Clerk 2025
RRB Technician DSSSB PGT BSPHCL Store Assistant
RPF Constable Chandigarh Police UPPSC RO ARO Exam Date
RPF SI Constable 2025

Test Series

JEE Main Mock Test 2025 LIC AAO Mock Test IBPS SC Mock Test CSIR NET Life Science Mock
JEE Advanced Mock Test KEAM Mock Test ESIC SSO Mock Test Test
2025 CDS Mock Test GUJCET Mock Test Gujarat Judiciary Test Series
NEET Mock Test 2025 MP GK Mock Test Haryana CET Mock Test RBI GRADE B Mock test
CTET Mock Test 2025 TCS NQT Mock Test Indian Army GD Mock Test AIBE Mock Test
CUET Mock Test 2025 IBPS RRB PO Mock Test UPPCL Executive Assistant UPSC Test Series
SSC CHSL Mock Test SSC Stenographer Mock Mock Test BSSC Inter Level Mock Test
NDA Mock Test Test ECGC PO Mock Test BSPHCL Junior Accounts
IBPS PO Mock Test WB TET Mock Test NIMCET Mock Test Clerk Mock Test
IBPS Clerk Mock Test RBI Assistant Mock Test NABARD Development BSPHCL Correspondence
SBI PO Mock Test REET Test Series Assistant Mock Test Clerk Mock Test
UGC NET Paper 1 Mock LIC ADO Mock Test MAH MBS CST Mock Test BSPHCL Store Assistant
Test UGC NET Commerce Mock UGC NET English Mock Test Mock Test
WB JEE Mock Test Test COMEDK UGET Mock Test UPPSC RO ARO Mock Test
RRB NTPC Mock Test CAT Mock Test 2025 IB Security Assistant Mock UPSSSC Junior Assistant
RRB Group D Mock Test SSC GD Constable Mock Test Mock Test
KCET Mock Test Test OSSC CGL Mock Test

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 26/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

OSSC CHSL Mock Test AIIMS CRE Mock Test BPSC AEDO Mock Test Bihar JEEVIKA Mock Test
English Get Started
SuperCoaching

UPSC Online Coaching CDS Coaching EMRS TGT and PGT RBI Assistant Coaching
CUET Online Coaching AFCAT Coaching Coaching EPFO SSA Coaching
BPSC Coaching Haryana CET Group D Bihar Police Constable UP Police constable
SSC JE Electrical Coaching Coaching Coaching Coaching
SSC JE Mechanical DFCCIL Junior Executive SSC MTS Coaching EMRS Accountant Coaching
Coaching Coaching SSC GD Coaching RPSC Assistant Professor
SSC JE Civil Coaching DFCCIL Operations & BD SSC CHSL Coaching Political Science Coaching
UGC NET Coaching Coaching Delhi Police Constable IBPS Clerk Coaching
CSIR NET Coaching DFCCIL Executive Coaching Coaching MP Police Constable
CTET Coaching Bihar Primary Teacher SSC IMD Coaching Coaching
SSC Coaching Coaching SSC CGL Tier 2 Coaching RBI Grade B Coaching
Railway Coaching Chandigarh Police SSC Selection Post CAT Coaching
Bank Exams Coaching Constable Coaching Coaching Bihar Jeevika Coaching
NDA Coaching JSSC JE Coaching UPSC CAPF AC Coaching

Previous Year Papers

UPSC Previous Year Bihar Police Constable CSIR NET Previous Year SSC JE EE Previous Year
Question Papers Previous Year Papers Papers Papers
SSC GD Previous Year SSC CHSL Previous Year RBI GRADE B Previous Year SSSC JE CE Previous Year
Papers Papers Papers Papers
SSC MTS Previous Year SSC CPO Previous Year IBPS CLERK Previous Year Delhi Police Constable
Papers Papers Papers Previous Year Papers
RRB NTPC Previous Year NDA Previous Year Papers Bihar Police SI Previous Year AIBE Previous Year
Papers AFCAT Previous Year Papers Papers Question Paper
RRB ALP Previous Year CDS Previous Year Papers SSC Havaldar Previous Year Gujarat Judiciary Previous
Papers MP Police Constable Papers Year Question Paper
RRB Technician Previous Previous Year Papers UPSC CAPF AC Previous AIIMS CRE Previous Year
Year Papers Chandigarh Police Year Papers Question Papers
UGC NET Previous Year Constable Previous Year Indian Airforce Agniveer NEET Previous Year
Papers Papers Previous Year Papers Question Papers
SSC CGL Previous Year DDA ASO Previous Year OSSC CGL Previous Year CUET Previous Year
Papers Papers Papers Question Papers
JEE Main Previous Year Maharashtra FOREST EPFO SSA Previous Year RRB JE Previous Year
Papers GUARD Previous Year Papers Question Papers
JEE Advanced Previous Year Papers UP Police SI Previous Year NHPC JE Previous Year
Papers UPSC CSAT Question Paper Papers Question Paper
RRB Office Assistant UP Police Constable SSC JE Previous Year Papers XAT Previous Year Question
Previous Year Papers Previous Year Papers SSC JE ME Previous Year Papers
IBPS RRB PO Previous Year Maharashtra Talathi Papers BPSC AEDO Previous Year
Papers Previous Year Papers Question Papers

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 27/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

Latest Updates
English Get Started
UPSC Current Affairs of KVS Notification 2025 KVS Non Teaching OTET Result 2025
26th September 2025 WB Special Education Recruitment 2025 KSET Result 2025
Trending News Teacher Notification 2025 CISCE Time Table 2026 Bihar Sakshamta Answer
CAT Admit Card 2025 OUT NICL AO Score Card 2025 CG TET नोटिफिके शन जारी Key 2025
SSC CHSL Exam Cancelled PFRDA Grade A Phase 2 SBI Clerk Mains Admit Card
SSC CHSL Expected Cut Off Result 2025 2025
2025 AIBE 20 Admit Card 2025

MCQ Questions

JAVA MCQ Software Engineering MCQ Constitution of India MCQ Statistics MCQ
Python MCQ Software Testing MCQ Cost Accounting MCQ Geography MCQ
HTML MCQ Computer Fundamentals Project Management MCQ Chemistry MCQ
Javascript MCQ MCQ Engineering Mechanics Biology MCQ
MS Word MCQ Computer Graphics MCQ MCQ My SSC App
Research Methodology Economy MCQ Determiners MCQ
MCQ Economics MCQ Agriculture MCQ

Testbook Products & Resources for Students

Plutus Education UPSC Preparation 2025 Evaluate UPSC Mains Classplus Blog
Online Law Courses by The UPSC Current Affairs Answer Legal Blog
Legal School Daily Editorials for UPSC Finance & Accounting Blog Judiciary Preparation

Books

Railway Books SSC GD Books Banking Books


UPSC Books AE/JE Books

Company Products Our Apps

About us Test Series


Testbook App
Careers We are hiring Testbook Pass
Download now
Testbook Edu Solutions Pvt. Teach Online on Testbook Online Courses
Ltd. Partners Online Videos Current Affairs
Media Practice Download now
1st & 2nd Floor, Zion
Building, Sitemap Blog
Follow us on
Plot No. 273, Sector 10, Refer & Earn
Books
https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 28/29
17/11/2025, 11:41 Pointer MCQ [Free PDF] - Objective Question Answer for Pointer Quiz - Download Now!

Kharghar,
Navi Mumbai - 410210 English Get Started

[email protected]
Toll Free:
1800 833 0800
Office Hours: 10 AM to 7 PM
(all 7 days)

Copyright © 2014-2022 Testbook Edu Solutions Pvt. Ltd.: All rights reserved User Policy Terms Privacy

https://testbook.com/objective-questions/mcq-on-pointer--5eea6a1139140f30f369eba5 29/29

You might also like