adplus-dvertising
frame-decoration

Question

What is the output of this program?
   #include <iostream>
   using namespace std;
   int main()
   {
       int a[2][4] = {3, 6, 9, 12, 15, 18, 21, 24};
       cout << *(a[1] + 2) << *(*(a + 1) + 2) << 2[1[a]];
       return 0;
   }

a.

15 18 21

b.

21 21 21

c.

24 24 24

d.

Compile time error

Answer: (b).21 21 21

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?