-
What is the output of this program?
#include
using namespace std;
int main()
{
int array[] = {40, 15, 60, 17};
int *ptr = (array + 3);
cout << *array + 8;
return 0;
}
-
- 40
- 15
- 60
- 17
- 48
Correct Option: E
In this program, we are adding the value 8 to the initial value of the array, So it’s printing as 48.