find the output of following program
Attachments:
gsfsdgthgfd:
is it a java program?
Answers
Answered by
7
Output of given C++ program:
a is of type integer. b is a pointer to the integer variable "a". Or, b is the address in memory of variable "a".
c gives a pointer, where a pointer to the location of variable "a" is stored.
d gives a point where a point to the location of pointer to the variable "a" is stored.
a= 12.
a + *b = 12 + 12 = 24
**c = a = 12.
***d = a = 12.
So the output of the given program will be: printed on two lines.
24
24
a is of type integer. b is a pointer to the integer variable "a". Or, b is the address in memory of variable "a".
c gives a pointer, where a pointer to the location of variable "a" is stored.
d gives a point where a point to the location of pointer to the variable "a" is stored.
a= 12.
a + *b = 12 + 12 = 24
**c = a = 12.
***d = a = 12.
So the output of the given program will be: printed on two lines.
24
24
Similar questions