What will be the output of the following C++ code? 1. #include <iostream> 2. using namespace std; 3. int main() 4. { 5. int a[2][4] = {3, 6, 9, 12, 15, 18, 21, 24}; 6. cout << *(a[1] + 2) << *(*(a + 1) + 2) << 2[1[a]]; 7. return 0; 8. } a) 15 18 21 b) 21 21 21 c) 24 24 24 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 a[2][4] = {3, 6, 9, 12, 15, 18, 21, 24}; 6. cout << *(a[1] + 2) << *(*(a + 1) + 2) << 2[1[a]]; 7. return 0; 8. } a) 15 18 21 b) 21 21 21 c) 24 24 24 d) Compile time error
Share
b) 21 21 21