A

Admin • 833K Points
Coach

Q. What is the output of the following C++ code?

Code:
#include <stdio.h>
#include<iostream>
using namespace std;
int main()
{
int x = 5, y = 10, z = 15;
int arr[3] = {&x, &y, &z};
cout << *arr[*arr[1] - 7];
return 0;
}
  • (A) 4
  • (B) 10
  • (C) 15
  • (D) Compiler error
  • Correct Answer - Option(D)
  • Views: 22
  • Filed under category C++
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.