Open In App

Algorithms Quiz | SP2 Contest 1 | Question 5

Like Article
Like
Save
Share
Report

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


Last Updated : 03 Nov, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads