Pointer MCQ : Basics of Pointer (Multiple Choice Questions)
Question 1 |
Pointer is special kind of variable which is used to stored __________ of the variable.
Data Type | |
Variable Name | |
Value | |
Address |
Question 2 |
Pointer variable is declared using preceding _________ sign.
^ | |
* | |
& | |
% |
Question 3 |
Address stored in the pointer variable is of type __________.
Array | |
Floating | |
Integer | |
Character |
Question 3 Explanation:
Pointer Variable of any type contains integer address because address of variable is always integer.
Question 4 |
Consider the 32 bit compiler. We need to store address of integer variable to integer pointer. What will be the size of integer pointer ?
6 Bytes | |
4 Bytes | |
2 Bytes | |
10 Bytes |
Question 4 Explanation:
32 bit compiler will take 2 bytes to store address of integer.
Question 5 |
In order to fetch the address of the variable we write preceding _________ sign before variable name.
Percent | |
Comma | |
Asteriks | |
Ampersand |
Question 5 Explanation:
"&" is used to get an address of the variable.
printf("%u",&var1;)above statement will return address of the variable var1.
There are 5 questions to complete.