Functions

Q1: Which of the following statement is correct about the program given below?
#include<iostream.h> 
class AptitudeCrackSample
{
    private:
    int AdditionOne(int x, int y = 1) 
    {
        return x * y;
    }
     
    public:
    int AdditionTwo(int x, int y = 1)
    {
        return x / y;
    } 
}; 
int main()
{
    AptitudeCrackSample objAptitude;
    cout<<objAptitude.AdditionOne(4, 8)<<' '; 
    cout<<objAptitude.AdditionTwo(8, 8); 
    return 0;
}

A The program will print the output 32 0.

B The program will print the output 32 garbage-value.

C The program will print the output 32 1.

D The program will report compile time error.

ANS:A - The program will print the output 32 0.

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.