πŸ“Š C++
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
πŸ’¬ Discuss
βœ… Correct Answer: (D) Compiler error

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
234
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
86%
Success Rate