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 like attending to all

B fully attended to by

C No correction required

D all attended to by

E attended by all

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 11 11.

B The program will print the output 11 10.

C The program will print the output 10 10.

D It will result in a compile time error.

E The program will print the output 10 11.

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 two garbage values.

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

D The program will print the output 10 20.

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 10 11 21.

B The program will print the output 10 11 11.

C It will result in a compile time error.

D The program will print the output 10 11 12.

E The program will print the output 0 11 21.

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 10 20 9.

B The program will print the output 0 0 10.

C It will result in a compile time error.

D The program will print the output 10 20 10.

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 It will result in a compile time error.

C The program will print the output 6 6 12.

D The program will print the output 6 6 10.

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 Garbage-value

B 10

C 20

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

E 0

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 The program will print the output 100 100.

B It will result in a compile time error.

C It will result in a runtime error.

D The program will print the output 9 4.

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

A three

B no

C one

D two

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 Preprocessing error.

B Compile-time error.

C Runtime error.

D Runtime exception.