What will be the output of the following C++ code? 1. #include <iostream> 2. using namespace std; 3. int main() 4. { 5. int i; 6. const char *arr[] = {"C", "C++", "Java", "VBA"}; 7. const char *(*ptr)[4] = &arr; 8. cout << ++(*ptr)[2]; 9. return 0; 10. } a) ava b) java c) c++ d) compile time error
What will be the output of the following C++ code? 1. #include <iostream> 2. using namespace std; 3. int main() 4. { 5. int i; 6. const char *arr[] = {"C", "C++", "Java", "VBA"}; 7. const char *(*ptr)[4] = &arr; 8. cout << ++(*ptr)[2]; 9. return 0; 10. } a) ava b) java c) c++ d) compile time error
Share
a) ava