C Programming Pointer Multiple choice question

Exercise : - Multiple Choice Question On C Programming, MCQ C Programming Pointer

This section contains a lot of c programming question and answer with explanation on the topic pointer. These question and answer are very much helpful for interview(campus interviews, walkin interviews, company interviews), competitive examination ,entrance test and placements. Each question having answer and explanation that would help you to understand easily. These question are designed from basic to advance level. So anyone can learn from here (beginner, fresher, engineering graduate, an experienced IT professional).

All the question of c programming are listed below on pointer along with detailed explanation / solution and answer.

1) A pointer is
A. A keyword used to create variables
B. A variable that stores address of an instruction
C. A variable that stores address of a programmable entity
D. All of the above

Answer:

All of the above

Option:

( D )


Explanation :

No explanations available for this question.


2) If a variable is a pointer to a structure, then which of the following operator is used to access data members of the structure through the pointer variable?
A. ->
B. .
C. &
D. *

Answer:

->

Option:

( A )


Explanation :

No explanations available for this question.


3) What is (void*)0?
A. Representation of void pointer
B. Error
C. None of above
D. Representation of NULL pointer

Answer:

Representation of NULL pointer

Option:

( D )


Explanation :

No explanations available for this question.


4) The below declaration means
                                                                          

int (*p) [5];

A. p is one dimensional array of size 5, of pointers to integers.
B. p is a pointer to a 5 elements integer array.
C. The same as int *p[5]
D. None of these.

Answer:

p is a pointer to a 5 elements integer array.

Option:

( B )


Explanation :

No explanations available for this question.


5) What the following, instruction tells?
                                                                          

const int *ptr

A. We cannot change the pointer ptr itself.
B. We cannot change the value pointed by ptr
C. We can change the pointer as well as the value pointed by it.
D. Both of the above

Answer:

We cannot change the value pointed by ptr

Option:

( B )


Explanation :

No explanations available for this question.