image not found

Oops! That page can't be found.


Directions to Solve

Which of phrases given below each sentence should replace the phrase printed in bold type to make the grammatically correct? If the sentence is correct as it is, mark 'E' as the answer.

Q1: The meeting was attended to by all invitees.

A all attended to by

B attended by all

C fully attended to by

D like attending to all

E No correction required

Q2: Which of the following statement is correct about the program given below?
#include<iostream.h> 
class AptitudeCrack
{
    int x, y; 
    public:
    void SetValue(int &xx, int &yy)
    {
        x =  xx ++;
        y =  yy; 
        Display();
    }
    void Display()
    {
        cout<< x << ' ' << y;
    }
};
int main()
{
    int x = 10;
    int &y = x;
    AptitudeCrack objAptitude;
    objAptitude.SetValue(x , y);
    return 0; 
}

A The program will print the output 10 10.

B The program will print the output 10 11.

C The program will print the output 11 11.

D The program will print the output 11 10.

E It will result in a compile time error.

Q3:
Which of the following statement is correct about the program given below?
#include<iostream.h> 
class AptitudeCrack
{
    int x, y; 
    public:
    AptitudeCrack(int &xx, int &yy)
    {
        x = xx;
        y = yy;
        Display();
    }
    void Display()
    {
        cout<< x << " " << y;
    }
};
int main()
{
    int x1 = 10; 
    int &p = x1;
    int y1 = 20; 
    int &q = y1; 
    AptitudeCrack objAptitude(p, q); 
    return 0; 
}

A It will result in a compile time error.

B The program will print the output 10 20.

C The program will print two garbage values.

D The program will print the address of variable x1 and y1.

Q4:
Which of the following statement is correct about the program given below?
#include<iostream.h> 
int i, j; 
class AptitudeCrack
{
    public:
    AptitudeCrack(int x = 0, int y = 0)
    {
        i = x; 
        j = x; 
        Display();
    }
    void Display()
    {
        cout<< j <<" ";
    } 
}; 
int main()
{
    AptitudeCrack objAptitude(10, 20); 
    int &s = i; 
    int &z = j; 
    i++;
    cout<< s-- << " " << ++z; 
    return 0; 
}

A The program will print the output 0 11 21.

B The program will print the output 10 11 11.

C The program will print the output 10 11 21.

D The program will print the output 10 11 12.

E It will result in a compile time error.

Q5: Which of the following statement is correct about the program given below?
#include<iostream.h> 
int x, y; 
class AptitudeTest
{
    public:
    AptitudeTest(int xx = 0, int yy = 0)
    {
        x = xx;
        y = yy;
        Display(); 
    } 
    void Display()
    {
        cout<< x << ' ' << y << ' ';
    }
};
int main()
{
    AptitudeTest objBT(10, 20); 
    int &rx = x; 
    int &ry = y; 
    ry = x;
    rx = y;
    cout<< rx--; 
    return 0; 
}

A The program will print the output 0 0 10.

B The program will print the output 10 20 10.

C The program will print the output 10 20 9.

D It will result in a compile time error.

Q6:
Which of the following statement is correct about the program given below?
#include<iostream.h> 
class AptitudeCrack
{
    int a, b, c; 
    public:
    void SetValue(int x, int y ,int z)
    {
        a = x;
        b = y;
        c = z;
    } 
    void Display()
    {
        cout<< a << " " << b << " " << c;
    } 
}; 
int main()
{
    AptitudeCrack objAptitude;
    int x  = 2;
    int &y = x;
    y = 5;
    objAptitude.SetValue(x, ++y, x + y);
    objAptitude.Display();
    return 0; 
}

A The program will print the output 5 6 10.

B The program will print the output 6 6 10.

C The program will print the output 6 6 12.

D It will result in a compile time error.

Q7: What will be the output of the program given below?
#include<iostream.h> 
class AptitudeBase
{
    int x;
    public:
    AptitudeBase(int xx = 0)
    {
        x = xx; 
    }
    void Display()
    {
        cout<< x ;
    }
};
class AptitudeDerived : public AptitudeBase
{
    int y; 
    public:
    AptitudeDerived(int yy = 0)
    {
        y = yy;
    }
    void Display()
    {
        cout<< y ;
    }
};
int main()
{
    AptitudeBase objBase(10); 
    AptitudeBase &objRef = objBase;

    AptitudeDerived objDev(20); 
    objRef = objDev;

    objDev.Display(); 
    return 0; 
}

A 0

B 10

C 20

D Garbage-value

E It will result in a compile-time/run-time error.

Q8: Which of the following statement is correct about the program given below?
#include<iostream.h> 
class AptitudeCrack
{
    int x, y; 
    public:
    AptitudeCrack(int xx = 0, int yy = 0)
    {
        x = xx; 
        y = yy;
    }
    void Display()
    {
        cout<< x << ' ' << y;
    }
    AptitudeCrack operator +(AptitudeCrack z)
    {
        AptitudeCrack objTemp;
        objTemp.x = x + z.x;
        objTemp.y = y + z.y;
        return objTemp; 
    }
};
int main()
{
    AptitudeCrack objAptitude1(90, 80); 
    AptitudeCrack objAptitude2(10, 20); 
    AptitudeCrack objSum; 
    AptitudeCrack &objRef = objSum; 
    objRef = objAptitude1 + objAptitude2; 
    objRef.Display(); 
    return 0; 
}

A It will result in a runtime error.

B It will result in a compile time error.

C The program will print the output 9 4.

D The program will print the output 100 100.

Q9: A constructor that accepts __________ parameters is called the default constructor.

A one

B two

C no

D three

Q10: What happens when a class with parameterized constructors and having no default constructor is used in a program and we create an object that needs a zero-argument constructor?

A Compile-time error.

B Preprocessing error.

C Runtime error.

D Runtime exception.