C++ Pointers & Functions Question: Download C++ Pointers & Functions PDF

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

Tweet Share WhatsApp