Home / Programming MCQs / C++ MCQs / Question

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

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.