While declaring pointer variables which operator do we use?

Question:  If you want to declare a pointer variable, then which operator will be used?

(A). * before the variable name

(B). * After the variable name

(C). – before the variable name

(D). –  after the variable name

Correct Answer: (A). * before the variable name

Example of the Program in C

*x and *y are two pointer variables having * before the variable name.

Output

Enter two integers to add
6
7
The Sume of the numbers = 13

Example of the Program in C++

*pointer_1 and *pointer_2 are two pointer variables having * before the variable name.

Output

Please Enter the first number:
3
Please Enter the second number:
4
The sum is: 7

Highly Recommended C++  Important MCQs with Explanation

  1. Which symbol is used to create multiple inheritances?
  2. If a derived class object is created, which constructor is called first?
  3. Which of the following is not a type of constructor?
  4. a ____ is a member function that is automatically called when a class object is __.
  5. What is the output of the following code in C++?
  6. How many times will the following code print?
  7. Which of the following is a procedural language?
  8. Which of the following is not a programming language?
  9. Which of the following is not an example of high-level language?
  10. While declaring pointer variables which operator do we use?
  11. To which does the function pointer point to?