Question
#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
Posted under Object Oriented Programming Using C++
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
View solution
Q. Which of the following correctly declares an array?
View solution
Q. What is the index number of the last element of an array with 9 elements?
View solution
Q. What is a array?
View solution
Q. Which of the following accesses the seventh element stored in array?
View solution
Q. Which of the following gives the memory address of the first element in array?
View solution
Q. What is meaning of following declaration?
int(*p[5])();
View solution
Q. What is size of generic pointer in C++ (in 32-bit platform) ?
View solution
Q. The constants are also called as
View solution
Q. What are the parts of the literal constants?
View solution
Q. How the constants are declared?
View solution
Q. Which of the following statement is not true about preprocessor directives?
View solution
Q. Regarding following statement which of the statements is true?
const int a = 100;
View solution
Q. The difference between x and ‘x’ is
View solution
Q. How to declare a wide character in string literal?
View solution
Q. Which value we cannot assign to reference?
View solution
Q. Identify the incorrect statement.
View solution
Q. Which reference modifier is used to define reference variable?
View solution
Q. What does a reference provide?
View solution
Q. Identify the correct sentence regarding inequality between reference and pointer.
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Object Oriented Programming Using C++? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!