Functions

Q1: Which of the following statement is correct about the program given below?
#include<iostream.h> 
struct MyStructure
{
    class MyClass
    {
        public:
        void Display(int x, float y = 97.50, char ch = 'a')
        {
            cout<< x << ' ' << y << ' ' << ch;
        }
    }Cls; 
}Struc;
 
int main()
{
    Struc.Cls.Display(12, 'b');
    return 0; 
}

A The program will print the output 12 97.50 b.

B The program will print the output 12 97.50 a.

C The program will print the output 12 98 a.

D The program will print the output 12 Garbage b.

E The program will print the output 12 Garbage a.

ANS:C - The program will print the output 12 98 a.

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.