Write a C++ statement or statements for each of the following. Assume have alrea
ID: 3919951 • Letter: W
Question
Write a C++ statement or statements for each of the following. Assume have already been included any needed ies (a) Declare an array studentID of integers that has 4 rows and 15 columns (b) Declare an array c of 12 Particle objects. (c) Declare a 10-row, 10-column array of pointers to Particle objects. (Here you just need to declare the array of pointers; you do not need to set them to point to anything.) returns a string. (e) Declare a pointer p to a Color object, and then assign it to point to a dynamically allocated Color object that has color (255, 235, 205)Explanation / Answer
a)
int studentID[4][15];
b)
Particle c[12];
c)
Particle *obj[10][10];
d)
string calculateColor(int r,int g,int b);
e)
Color c(255,235,205);
Color *p=&c; //storing address of color object
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.