Question
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int i;
6.
char *arr[] = {"C", "C++", "Java", "VBA"};
7.
char *(*ptr)[4] = &arr;
8.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int i;
6.
char *arr[] = {"C", "C++", "Java", "VBA"};
7.
char *(*ptr)[4] = &arr;
8.
cout
Answer: Option A
Was this answer helpful ?
In this program we are moving the pointer from first position to second position and printing the
remaining value.
Output:
$ g++ point1.cpp
$ a.out
ava
Was this answer helpful ?
Submit Solution