Cpp Programming 86 – Which of the following factors supports the statement that reusability is a desirable feature of a language?
[B]. It lowers the maintenance cost.[C]. It reduces the compilation time.
[D]. Both A and B.
Answer: Option D
Answer: Option D
#include
class BixTest
{
    public:
    BixTest(int &x, int &y)
    {
        x++;
        y++;
    }
};
int main()
{
    int a = 10, b = 20;
    BixTest objBT(a, b);
    cout<< a << " " << b; 
    return 0; 
}
[A].10 20
[B].11 21
[C].Garbage Garbage
[D].It will result in a compile time error. 
Answer: Option B
#include
#include
class IndiaBix
{
    char str[50];
    char tmp[50];
    public:
    IndiaBix(char *s)
    {
        strcpy(str, s);
    }
    int BixFunction()
    {
        int i = 0, j = 0;
        while(*(str + i))
        {
            if(*(str + i++) == ' ')
                *(tmp + j++) = *(str + i);
        }
        *(tmp + j) = 0;
        return strlen(tmp);
    }
};
int main()
{
    char txt[] = "Welcome to IndiaBix.com!";
    IndiaBix objBix(txt);
    cout<< objBix.BixFunction();
    return 0;
}
[A].1
[B].2
[C].24
[D].25 
Answer: Option B
#include
class IndiabixSample
{
    private:
    int AdditionOne(int x, int y = 1)
    {
        return x * y;
    }
    public:
    int AdditionTwo(int x, int y = 1)
    {
        return x / y;
    }
};
int main()
{
    IndiabixSample objBix;
    cout<
[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. 
Answer: Option D
Constructor is called either implicitly or explicitly, whereas destructor is always called implicitly.
[C].
Destructor is always called explicitly.
[D].
Constructor and destructor functions are not called at all as they are always inline.
Answer: Option B
Explanation:
No answer description available for this question.
#include
int main()
{
    int x = 10;
    int &y = x;
    x++;
    cout<< x << " " << y++;
    return 0; 
}[A].The program will print the output 11 12.
[B].The program will print the output 12 11.
[C].The program will print the output 12 13.
[D].It will result in a compile time error. 
Answer: Option B
A destructor has a different name than the class in which it is present.
[C].
A destructor always returns an integer.
[D].
A destructor can be overloaded.
Answer: Option A
Explanation:
No answer description available for this question.