Sail E0 Webinar
Question


Which of the following statement is correct about the program given below?


#include
static double gDouble;
static float gFloat;
static double gChar;
static double gSum = 0;
class BaseOne
{
public:
void Display(double x = 0.0, float y = 0.0, char z = 'A')
{
gDouble = x;
gFloat = y;
gChar = int(z);
gSum = gDouble + gFloat + gChar;
cout
Options:
A .  The program will print the output 0.
B .  The program will print the output 120.
C .  The program will report run-time error.
D .  The program will report compile-time error.
E .  The program will print the output garbage value.
Answer: Option D



Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers