Open In App

Top | MCQs on Array Data Strcuture with Answers | Question 12

What will the output of the below code, be if the base address of the array is 1200?




#include <iostream>
using namespace std;
 
int main()
{
 
    int arr[] = { 1, 2, 3, 4, 5 };
    cout << arr << ", " << &arr << ", " << &arr[0] << endl;
    return 0;
}

(A)



1200, 1202, 1204

(B)



1200 1200 1200

(C)

1200, 1204, 1208

(D)

1200, 1204, 1208


Answer: (B)
Explanation:

Given that, the base address of the array is 1200.

Hence the correct option is (B)

Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :
Uncategorized