adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    using namespace std;
    int main()
    {
        int a = 5, b = 10, c = 15;
        int *arr[ ] = {&a, &b, &c};
        cout << arr[1];
        return 0;
    }

a.

5

b.

10

c.

15

d.

it will return some random number

Answer: (d).it will return some random number

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?

Similar Questions

Discover Related MCQs

Q. The correct statement for a function that takes pointer to a float, a pointer to a pointer to a char and returns a pointer to a pointer to a integer is

Q. Which of the following correctly declares an array?

Q. What is the index number of the last element of an array with 9 elements?

Q. What is a array?

Q. Which of the following accesses the seventh element stored in array?

Q. Which of the following gives the memory address of the first element in array?

Q. What is meaning of following declaration?
int(*p[5])();

Q. What is size of generic pointer in C++ (in 32-bit platform) ?

Q. The constants are also called as

Q. What are the parts of the literal constants?

Q. How the constants are declared?

Q. Which of the following statement is not true about preprocessor directives?

Q. Regarding following statement which of the statements is true?
const int a = 100;

Q. The difference between x and ‘x’ is

Q. How to declare a wide character in string literal?

Q. Which value we cannot assign to reference?

Q. Identify the incorrect statement.

Q. Which reference modifier is used to define reference variable?

Q. What does a reference provide?

Q. Identify the correct sentence regarding inequality between reference and pointer.