Question: basic c++ 2. AC++ program contains the following C++ code (assume an int occupies 2 bytes each in memory): int x[ ] = { 10,

basic c++
2. AC++ program contains the following C++ code (assume an int occupies 2 bytes each in memory): int x[ ] = { 10, 20, 30, 40, 50, 60, 70, 80); int *ptrx ptrx = x; Array x starts at memory location 2140. a. What is the value assigned to ptrx? b. What is the value of (x+2)? c. What is the value of *x? d. What is the value of (*x+2)? e. What is the value of *(x+2)? f. What is the value of ptrx +3? g. What is the value of ptrx after the statement ptrx &(x[4]); Write a loop that will access each member of x using pointer offset notation h. 3. Given the following declarations: char ptrstuff int n Write the one statement that will dynamically allocate a character array of size n. a. b. Write the one statement that would delete the dynamically allocated array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
