πŸ“Š C++
Q. What is the output of the following C++ code?
Code:
#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
  int arr[] = {100, 200, 300};
  cout << -2[arr];
  return 0;
}
  • (A) Runtime error
  • (B) Compilation error
  • (C) -300
  • (D) 300
πŸ’¬ Discuss
βœ… Correct Answer: (A) Runtime error

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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