Draw the pictures representing each of the declarationsbelow.
These problems build on each other, so in some cases a picturerefers to something previously created.
/* Lab 13: Picture Dynamic Memory
Objective: Draw Pictures of Computer Memory
*/
#include<iostream>
using namespace std;
int main() {
// A.
int numbers[5];
//————-
// B.
char words[3][10];
//—————-
// C.
int *pNumbers = new int[4];
//————————-
// D.
char **pWords;
pWords = new char*[3];
for( int i=0; i<3; i++) {
pWords[i] = new char[5];
}
//—————————
// E.
//Assume we have:
class Student{
public:
Student(){
initials[0] = ‘D’;
initials[1] = ‘F’;
initials[2] = ‘R’;
UIN = 12345;
}
private:
char initials[3]; // Delano Franklin Roosevelt would be DFR
long UIN;
};
// Now draw the following:
Student cs141[3];
Student *pStudent = &cs141[2];
Student *pOther = pStudent;
//————————————–
//F.
//Assume we have:
struct Node {
int data;
Node *pNext;
};
// Now draw
PayPal Gateway not configured
PayPal Gateway not configured