Pointer MCQ (Free PDF) - Objective Question Answer For Pointer Quiz - Download Now!
Pointer MCQ (Free PDF) - Objective Question Answer For Pointer Quiz - Download Now!
Pointer MCQ Quiz - Objective Question with Answer for Pointer - Download Free PDF
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.
1. A, B, C Only
2. A, B, D Only
3. A, B Only
4. A, E Only
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
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.”
Mini examples
int a[10];
int *p = &a[3];
int *q = &a[7];
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!
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
Pointer Question 2:
#include
#define var 3
void main()
**(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!
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
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].
EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform
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!
Pointer Question 3:
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
Explanation:
int (*p)[5];
Important Difference:
EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform
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
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!
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.
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).
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
Pointer Question 5:
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
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
#include
int main ( )
int i, sum = 0, *b = a + 4;
return 0;
*b = 10 // dereferencing
sum = 0 // initially
= 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!
=9-8=1
=9-6=3
= 10 - 4 = 6
= 12 - 2 = 10
EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform
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!
struct Ournode {
char x, y, z ;
};
int main ( ) {
return 0 ;
1. 0, c
2. 0, a + 2
3. ‘0’, ‘a + 2’
4. ‘0’, ‘c’
Option 1 : 0, c
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!
Character ‘a’ has ASCII value 97, adding 2 will result in 99, which is the ASCII value for ‘c’.
So, p={'1','0','c'};
EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform
#include
int main ( )
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
}
int *ip = arr + 4 //ip is a integer pointer pointing to 5 element of the array
EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform
#include
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( )
rer(&ptr1, &ptr2);
1. 60 70
2. 50 50
3. 50 60
4. 60 50
Option 4 : 60 50
Concept –
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!
5× 10
**ptr1 *= **ptr2 2000 2000 1000 10
= 50
EE
FR
India’s #1 Learning Platform Trusted by 7.8 Crore+ Students
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!
#include
int main ( )
int **ptr = p;
ptr++;
Concept:
Rule of pointer arithmetic: When two pointers are subtracted belonging to same array then result is
number of elements separating them.
Explanation:
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
EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform
#include
int main()
{
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!
4. 17
Option 4 : 17
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.
EE
FR
Trusted by 7.8 Crore+ Students
India’s #1 Learning Platform
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?
Key Points
Given that,
char * x;
int * y;
float * z;
Then,
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.
EE
FR
India’s #1 Learning Platform Trusted by 7.8 Crore+ Students
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 () {
2. 2012, 4, 2204
3. 2036, 10, 10
4. 2012, 4, 6
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!
EE
FR
India’s #1 Learning Platform Trusted by 7.8 Crore+ Students
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!
#include
void main()
int k = 5;
int *p = &k;
1. 5 5 5
2. 5 5 junk
3. 5 junk junk
Option 1 : 5 5 5
k is an integer variable.
%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.
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
#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
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
It has:
where *x = 30 and *y = 30
Hence:
*x = 30 * 29
*x = 870
EE
FR
India’s #1 Learning Platform Trusted by 7.8 Crore+ Students
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!
Exam Preparation
Simplified
Learn, practice, analyse and improve
Related MCQ
Array 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!
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
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
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
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