- 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;
6 Respostas
+ 14
cout << *pa/*pb << endl;
or
cout << *pb/*pa << endl;
+ 2
int division = *pa/*pb // *pa takes value of a and pa without * takes the address on memory of variable a
cout << division;
+ 2
int a = 12;
int b = 14;
int* pa = &a;
int* pb = &b;
cout << * pa / *pb << endl;
+ 2
*pa/*pb << endl;
0
Thank you!
- 1
int *ptr = ? var;