πŸ“Š C++
Q. What is the output of the following C++ code?
Code:
#include <iostream>
using namespace std;
int f = 100;
int main()
{
  int a;
  {
    int b;
    b = 10;
    a = 25;
    f = 35;
    cout << b << a << f;
  }
  a = 40;
  cout << a << f;
  return 0;
}
  • (A) 10253540100
  • (B) 1025352535
  • (C) 1025354035
  • (D) 1040253535
πŸ’¬ Discuss
βœ… Correct Answer: (C) 1025354035

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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