Skip to content
Related Articles

Related Articles

Improve Article

Algorithms Quiz | SP2 Contest 1 | Question 5

  • Last Updated : 03 Nov, 2020

What will be the output of below C++ program?




#include <iostream>
  
using namespace std;
  
int  main() 
{
    float _ = 20.5;
      
    int __ = 20;
      
    cout<< __ + _ <<endl;
  
    return 0;
}

(A) Runtime Error
(B) Compile Time Error
(C) __+_
(D) 40.5


Answer: (D)

Explanation: Underscore(_) and double underscores(__) can be used as variable names.


Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :