Home Subjects C Programming Pointers

C Programming
Pointers

C language from basics to advanced placement prep

27 Q 10 Topics Take Mock Test
Advertisement
Difficulty: All Easy Medium Hard 21–27 of 27
Topics in C Programming
Q.21 Easy Pointers
What is the size of a pointer variable on a 32-bit system?
A 2 bytes
B 4 bytes
C 8 bytes
D Depends on the data type
Correct Answer:  B. 4 bytes
EXPLANATION

On a 32-bit system, all pointers are 4 bytes (32 bits) regardless of the data type they point to.

Test
Q.22 Easy Pointers
A pointer variable stores the _____ of another variable.
A value
B memory address
C data type
D size
Correct Answer:  B. memory address
EXPLANATION

Pointers store memory addresses of variables. The address-of operator (&) retrieves this address.

Test
Q.23 Easy Pointers
Identify the output:
char *str = "Hello";
printf("%c", *str);
A H
B Hello
C e
D Address
Correct Answer:  A. H
EXPLANATION

*str dereferences the pointer to get the first character of the string, which is 'H'.

Test
Q.24 Easy Pointers
Which of the following is NOT a valid pointer declaration?
A int *p;
B float *q;
C void *r;
D int &s;
Correct Answer:  D. int &s;
EXPLANATION

& is a reference operator used in C++, not in C. In C, pointers are declared using *.

Test
Q.25 Easy Pointers
What is a NULL pointer?
A Pointer pointing to address 0
B Uninitialized pointer
C Pointer with no name
D Invalid pointer
Correct Answer:  A. Pointer pointing to address 0
EXPLANATION

A NULL pointer is a pointer that points to memory address 0, indicating it doesn't point to any valid memory location.

Test
Q.26 Easy Pointers
What will be the size of a pointer variable on a 64-bit system?
A 2 bytes
B 4 bytes
C 8 bytes
D 16 bytes
Correct Answer:  C. 8 bytes
EXPLANATION

On a 64-bit system, a pointer is 8 bytes (64 bits) regardless of the data type it points to.

Test
Q.27 Easy Pointers
Which operator is used to get the address of a variable in C?
A *
B &
C ->
D .
Correct Answer:  B. &
EXPLANATION

The & operator (address-of operator) returns the memory address of a variable.

Test
IGET
IGET AI
Online · Exam prep assistant
Hi! 👋 I'm your iget AI assistant.

Ask me anything about exam prep, MCQ solutions, study tips, or strategies! 🎯
UPSC strategy SSC CGL syllabus Improve aptitude NEET Biology tips