Question
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int a[2][4] = {3, 6, 9, 12, 15, 18, 21, 24};
6.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int a[2][4] = {3, 6, 9, 12, 15, 18, 21, 24};
6.
cout
Answer: Option B
Was this answer helpful ?
a[1][2] means 1 * (4)+2 = 6th element of an array staring from zero.
Output:
$ g++ point.cpp
$ a.out
21 21 21
Was this answer helpful ?
Submit Solution