Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int arr[] = {4, 5, 6, 7};
6.
int *p = (arr + 1);
7.
cout
Options:
A .  12
B .  5
C .  13
D .  error
Answer: Option C

In this program, we are adding the value 9 to the initial value of the array, So it’s printing as 13.
Output:
$ g++ point5.cpp
$ a.out
13



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers