pls | Sololearn: Learn to code for FREE!

-1

pls

Fill in the blanks to declare two variables a and b; and two pointers pa and pb that point to a and b, respectively. Print to the screen the value of the division of a and b variables accessed via pointers pa and pb. int a = 12; int b = 14; int* pa = &a; int* pb = &b; cout << pa / *pb << endl;

c++

1/25/2017 6:26:11 AM

Xiaoyun Yao

6 Answers

New Answer

+13

cout << *pa/*pb << endl; or cout << *pb/*pa << endl;

+3

int division = *pa/*pb // *pa takes value of a and pa without * takes the address on memory of variable a cout << division;

+1

Thank you!

+1

int a = 12; int b = 14; int* pa = &a; int* pb = &b; cout << * pa / *pb << endl;

+1

*pa/*pb << endl;

0

int *ptr = ? var;