Sail E0 Webinar
Question


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
Options:
A .  ava
B .  java
C .  c++
D .  compile time error
Answer: Option A

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 ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers