Pic 22413 MCQ Unit 6
Pic 22413 MCQ Unit 6
Unit 6: Pointers
MCQ Question Bank with Answers
1. A pointer is
D. None of these
Ans : B
B. To pass large structures so that complete copy of the structure can be avoided.
C. Pointers enable complex “linked" data structures like linked lists and binary trees.
Ans : D
A. (((***(a+i)+j)+k)+l)
B. ((**(*(a+i)+j)+k)+l)
C. (*(*(*(a+i)+j)+k)+l)
D. *(*(*(*(a+i)+j)+k)+l)
Ans : D
4. What is the base data type of a pointer variable by which the memory would be allocated
to it?
a) int
b) float
c) No datatype
Ans: e
a) Declared
b) Initialized
d) None of these
Answer: C
a) int p*;
b) int *p;
c) int +p;
d) int $p;
Answer: B
a) Passed to a function
c) Returned by a function
d) Can be assigned an integer value
Answer: C
void main() {
p = a;
++*p;
p += 2;
a) 24
b) 34
c) 22
d) 23
Answer: D
char *ptr;
ptr = myString;
ptr += 5;
a) fg
b) efg
c) defg
d) cdefg
e) bcdefg
Answer: A
int main() {
return 0;
a) True
b) False
Answer: A
a) True
b) False
Answer: B
12. Which of the following statements is correct about k used in the below statement?
char ****k;
a) k is a pointer to a pointer to a pointer to a char
Answer: B
char *p = 0;
char *t = NULL;
a) Yes
b) No
Answer: B
Happy Learning!
cwipedia.in