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
Submitted by: Administratorb) 21 21 21
Submitted by:
Submitted by:
Read Online C++ Pointers & Functions Job Interview Questions And Answers
Top C++ Pointers & Functions Questions
☺ | Can you please explain the difference between Pointer to constant and pointer constant? |
☺ | How many minimum number of functions are need to be presented in c++? |
☺ | Explain function pointers? |
☺ | Explain pointer with examples? |
Top C Plus Plus Language Categories
☺ | C++ Pointers & Functions Interview Questions. |
☺ | C++ Operator Overloading Interview Questions. |
☺ | C++ Exception Handling Interview Questions. |
☺ | C++ Template Interview Questions. |
☺ | C++ Virtual Functions Interview Questions. |