Vidyalelo
C++ Programming · Q57

Pointers and References in C++

Programming · C++ Programming · question 57

Q57

What will be the output of the following C++ code? #include using namespace std; int main() int i; const char *arr[] = "C", "C++", "Java", "VBA"; const char *(*ptr)[4] = &arr; cout << ++(*ptr)[2]; return 0;

A.
ava
Answer
B.
java
C.
c++
D.
compile time error

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board