Which of the following is a legally correct way of declaring a variable that is a pointer to an integer?
A) int* ptr
B) pointer<int> ptr
C) int& ptr
D) int ptr*
Ans: A
Title: Which statement declares a variable that is a pointer to an integer?
Pointers
- Consider the code snippet below. int ch = 100; Which of the following is a legally correct way of obtaining the memory location of ch and printing it (the memory location) to standard output, based on the given code snippet?
- What is true about the statement given below? int* choice;
- Which of the following statements is true about pointers?
- A pointer describes which of the following?
- Which statement is true about an uninitialized pointer?