Skip to content
Related Articles
Open in App
Not now

Related Articles

Algorithms Quiz | SP2 Contest 1 | Question 5

Improve Article
Save Article
Like Article
  • Last Updated : 03 Nov, 2020
Improve Article
Save Article
Like Article

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
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!