- 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;

25th Jan 2017, 6:26 AM
Xiaoyun Yao
Xiaoyun Yao - avatar
6 Respostas
+ 14
cout << *pa/*pb << endl; or cout << *pb/*pa << endl;
25th Jan 2017, 6:39 AM
Hatsy Rei
Hatsy Rei - avatar
+ 2
int division = *pa/*pb // *pa takes value of a and pa without * takes the address on memory of variable a cout << division;
25th Jan 2017, 6:32 AM
Kawaii
Kawaii - avatar
+ 2
int a = 12; int b = 14; int* pa = &a; int* pb = &b; cout << * pa / *pb << endl;
12th Dec 2020, 8:00 AM
Ricardo M Delgado
Ricardo M Delgado - avatar
+ 2
*pa/*pb << endl;
19th Jun 2021, 10:37 AM
Hayder Jawad Al-ATBEE
Hayder Jawad Al-ATBEE - avatar
0
Thank you!
5th Dec 2020, 2:50 AM
Hafiz Ramadhan
Hafiz Ramadhan - avatar
- 1
int *ptr = ? var;
12th Jan 2021, 12:52 PM
Pathak Mohit
Pathak Mohit - avatar