Question: a) () What is a pointer? Apakah penuding? (ii) State the usage of C++ operator * and & while using a pointer. Nyatakan kegunaan operator


a) () What is a pointer? Apakah penuding? (ii) State the usage of C++ operator * and & while using a pointer. Nyatakan kegunaan operator C++ * dan & apabila menggunakan penuding (iii) Given the following C++ declaration: Diberi pengisytiharan C++ berikut: char yes='%'; char *ptr = &yes; What is the output for the following C++ statements? Apakah output untuk kenyataan-kenyataan C++ berikut? . cout using namespace std; int main 01 float ptri,ptr2; float sale, rate, commision, totalEarn; cout > sale; ptri sale; //set ptrl point to variable sale rate = 0.2; // 20 % ptr2 & commision; set ptr2 point to variable commision *ptr2 *ptrl + rate; cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
