Vidyalelo
Computer Science · Q528

Object Oriented Programming Using C++

Engineering and GATE · Computer Science · question 528

Q528

Assume that a program creates and initializes a Short Integer variable named age and a pointer named agePtr, to which it assigns the address of the age variable. Which of the following statements will assign the number 21 to the age variable?

A.
age = 21;
B.
*age = 21;
C.
agePtr = 21;
D.
*agePtr = 21;
E.
both (a) and (d)
Answer

Answer: Option E

Solution

Answer: Option E
No explanation is given for this question Let's Discuss on Board