Pointers Solved MCQs Questions Answers

Last modified on September 12th, 2020

Pointers Solved MCQs Questions Answers

Let us see the Pointers Solved MCQs Questions Answers.

1. we can manipulate data stored in other variables ________ with pointer variables.
a. All of these
b. never
c. seldom
d. indirectly
e. none of these
f. both a and b
Answer d

2.following statement has the same meaning as
int *ptr;
a. int* ptr;
b. int ptr;
c. *int ptr;
d. int ptr*;
e. none of these
f. both a and b
Answer a

3.which of the following options can be used as pointers.
a. All of these
b. Array names
c. Numeric constants
d. Punctuation marks
e. None of these
e. none of these
f. both c and b
Answer b

4. which of the following operators are used to increment or decrement a pointer variable.
a. modulus, division
b. addition, subtraction
c. ++, —
d. +-,-+
e. None of these
e. none of these
d. both c and d
Answer c

5. ________ is used to initialize a pointer.
a. all of these
b. the address of an existing object
c. the value of an integer variable
d. the value of a floating-point variable
e. none of these
f. both a and b
Answer b

6. What is the function of the following statement?
double *num2;
a. Declares a pointer variable named num2.
b. Declares a double variable named num2.
c. Declares and initializes a pointer variable named num2.
d. Initializes a variable named *num2.
e. none of these
f. both a and b
Answer a

7. the delete operator can be used on the pointers:
a. dereferenced inappropriately
b. never used
c. not correctly initialized
d. created with the new operator
e. none of these
f. both a and b
Answer d

8. Which of the following are invalid statements?
a. float num1 = &ptr2;
b. int ptr = &num1;
c. int ptr = int *num1;
d. All of these are invalid
e. All of these are valid
f. both a and b
Answer d

9.what is stored in a pointer variable?
a. an integer
b. a memory address.
c. only floating-point values.
d. any C++ value.
e. none of these
d. both a and b
Answer b

10.pointer variables may be changed with mathematical statements that perform___________.
a. special operations
b. all mathematical operations
c.multiplication and division
d. addition and subtraction
e. none of these
f. both a and b
Answer d

11. Reference is not the same as a pointer because
A. a reference can never be null
B. a reference once established cannot be changed.
C. reference doesn’t need an explicit dereferencing mechanism.
D. All of above
e. none of these
d. both a and b
Answer c

12. size of generic pointer is _______.
A. 0
B. 1
C. 2
D. 3
e. none of these
d. both a and b
Answer c

13. Referencing a value through a pointer is called
a. All of them
b. Direct calling
c. Indirection
d. Pointer referencing
e. none of these
d. both a and b
Answer c

14.Generic pointers can be declared with__________ .
A. void
B. asm
C. auto
D. all of the above
e. none of these
d. both a and c
Answer a

Computer Science Repeated MCQs Book Download

Subscribe for Friendship

Latest posts by Prof. Fazal Rehman Shamil (see all)