In C++: Examine the code segment. What will be printed? If there are any errors indicate the nature of each error. int a[7] = {31, 12, 32, 14, 25, 16, 27}; int *ptr; ptr = & a[2]; for ( i=1; i


In C++:


Examine the code segment. What will be printed?


If there are any errors indicate the nature of each error.


int a[7] = {31, 12, 32, 14, 25, 16, 27};


int *ptr;


ptr = & a[2];


for ( i=1; i<=5; i="">


cout < *(ptr="">


cout < a[0]="">< *ptr="">< *ptr="" -="" 2="">< *(ptr="" -1))=""><>



Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here