Question
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int arr[] = {4, 5, 6, 7};
6.
int *p = (arr + 1);
7.
cout
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
Answer: Option B
Was this answer helpful ?
In this program, we are making the pointer point to next value and printing it.
$ g++ point3.cpp
$ a.out
5
Was this answer helpful ?
Submit Solution