Question: C++ Give a step by step explanation for each question AT&T LTE 7:24 PM 91% 46:05 Exit 1 What will be displayed? Describe contents of
C++
Give a step by step explanation for each question
AT&T LTE 7:24 PM 91% 46:05 Exit 1 What will be displayed? Describe contents of the pointers and memory addresses at each step to explain the result. #include using namespace std; int main) int a 32, *ptr - &a; char ch 'A, &cho ch; cho += a; *ptrch; cout usingnamespacestd; intmain() intnum[5] int* p; *p 10; *p 20; p &num[2] p 30; p num 3; *p 40; AT&T LTE 7:25 PM 91% 45:43 Exit intnum[5] int* p; p num; *p 10; *p 20; p = &num[2]; *p 30; Pnum 3; p 40; p = num; *(p 4) 50; for(inti 0; i using namespace std; int main) int i = 20; int* ptr : &i; ('ptr)++; int j 15; ptr = &j; (*ptr++); cout using namespace std; int main(0 int x[5] 1, 2, 3, 4, 5) int* p = x; int i for (i 0; using namespace std; int main) int x[5] = { 1, 2, 3, 4, 5 }; int* p = x; int i for ( = 0; i using namespace std; int main() int arril 1, 2, 3 ) int* ptri-arri; char arrcll 1, 2, 3 char* ptrc = arrc; cout using namespace std; int* myfun(int*); int main) int x[5] = { 1, 2, 3, 4, 5 }; int i, *p; p myfun(x); for (i = 0; i usingnamespacestd; #include intmain( char* str "AAAAA" "BBBBB", "CCCCC" char** sptr[ char***pp; pp spt; str 3, str 2, str 1, strl; printf("%s", **++pp + 2); returno AT&T LTE 7:24 PM 91% 46:05 Exit 1 What will be displayed? Describe contents of the pointers and memory addresses at each step to explain the result. #include using namespace std; int main) int a 32, *ptr - &a; char ch 'A, &cho ch; cho += a; *ptrch; cout usingnamespacestd; intmain() intnum[5] int* p; *p 10; *p 20; p &num[2] p 30; p num 3; *p 40; AT&T LTE 7:25 PM 91% 45:43 Exit intnum[5] int* p; p num; *p 10; *p 20; p = &num[2]; *p 30; Pnum 3; p 40; p = num; *(p 4) 50; for(inti 0; i using namespace std; int main) int i = 20; int* ptr : &i; ('ptr)++; int j 15; ptr = &j; (*ptr++); cout using namespace std; int main(0 int x[5] 1, 2, 3, 4, 5) int* p = x; int i for (i 0; using namespace std; int main) int x[5] = { 1, 2, 3, 4, 5 }; int* p = x; int i for ( = 0; i using namespace std; int main() int arril 1, 2, 3 ) int* ptri-arri; char arrcll 1, 2, 3 char* ptrc = arrc; cout using namespace std; int* myfun(int*); int main) int x[5] = { 1, 2, 3, 4, 5 }; int i, *p; p myfun(x); for (i = 0; i usingnamespacestd; #include intmain( char* str "AAAAA" "BBBBB", "CCCCC" char** sptr[ char***pp; pp spt; str 3, str 2, str 1, strl; printf("%s", **++pp + 2); returno