A
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;
}
#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;
}
- Correct Answer - Option(D)
- Views: 22
- Filed under category C++
- Hashtags:
Discusssion
Login to discuss.