adplus-dvertising
frame-decoration

Question

What is the output of this program?
   #include <iostream>
   using namespace std;
   int main()
   {
       int i;
       char *arr[] = {"C", "C++", "Java", "VBA"};
       char *(*ptr)[4] = &arr;
       cout << ++(*ptr)[2];
       return 0;
   }

a.

ava

b.

java

c.

c++

d.

compile time error

Answer: (a).ava

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?