Math, asked by Anonymous, 11 months ago

pointer variable cannot be multiplied by constant Int*ptr;ptr=ptr*9;//illegal​

Answers

Answered by DrNykterstein
0

A point varible can be multiplied by constant, but you just have to know the correct way.

int y = 2;

int *ptr = &y;

cout << *ptr * 2 ;

Output: 4

Similar questions