image not found

Oops! That page can't be found.


Directions to Solve

In questions below, each passage consist of six sentences. The first and sixth sentence are given in the begining. The middle four sentences in each have been removed and jumbled up. These are labelled as P, Q, R and S. Find out the proper order for the four sentences.

Q1:
S1: You know my wife, Madhavi, always urged me to give up smoking.
P : I really gave it up.
Q : And so When I went to jail I said to myself I really must give it up, if for no other reason than of being self-reliant.
R : When I emerged from jail, I wanted to tell her of my great triumph.
S : But when I met her, there she was with a packet of cigarettes.
S6: poor girl!.
The Proper sequence should be:

A QPRS

B SPQR

C RSPQ

D PSRQ

Q2: Which of the following are unary operators in C?
1. !
2. sizeof
3. ~
4. &&

A 1,2,4

B 1, 2

C 1,3

D 2,4

Q3:
Which of the following statement is correct about the program given below?
#include<iostream.h>
#include<string.h> 
class AptitudeCrack
{
    public:
    void GetData(char *s, int x, int y )
    {
        int i = 0;
        for (i = x-1; y>0; i++)
        {
            cout<< s[i];
            y--; 
        } 
    }
}; 
int main()
{
    AptitudeCrack objAptitude;
    objAptitude.GetData((char*)'Welcome!', 1, 3);
    return 0; 
}

A The program will print the output Wel.

B The program will result in a compile time error.

C The program will print the output me!.

D The program will print the output !em.

E The program will print the output Welcome!.

Q4:
Which of the following statement is correct about the program given below?
#include<iostream.h> 
class AptitudeData
{
    int x, y, z; 
    public:
    AptitudeData(int xx, int yy, int zz)
    {
        x = ++xx;
        y = ++yy;
        z = ++zz;
    }
    void Show()
    {
        cout<< '' << x++ << ' ' << y++ << ' ' << z++;
    } 
}; 
int main()
{
    AptitudeData objData(1, 2, 3);
    objData.Show();
    return 0; 
}

A The program will print the output 1 2 3.

B The program will print the output 2 3 4 .

C The program will print the output 4 5 6.

D The program will report compile time error.

Q5:
Which of the following statement is correct about the program given below?
#include<iostream.h> 
class AptitudeCrack
{
    int x; 
    float y; 
    public:
    void Function()
    {
        x = 4; 
        y = 2.50; delete this;
    }
    void Display()
    {
        cout<< x << ' ' << y;
    } 
}; 
int main()
{
    AptitudeCrack *pAptitude = new AptitudeCrack();
    pAptitude->Function(); 
    pAptitude->Function(); 
    pAptitude->Display(); 
    return 0; 
}

A The program will report compile time error.

B The program will print the output 4 2.5.

C The program will report runtime error.

D The program will print the output 4.

Q6:
What will be the output of the following program?
#include<iostream.h> 
class AptitudeCrack
{
    static int count; 
    public:
    static void First(void)
    {
        count = 10;
    }
    static void Second(int x)
    {
        count = count + x; 
    }
    static void Display(void)
    {
        cout<< count << endl;
    } 
};
int AptitudeCrack::count = 0; 
int main()
{
    AptitudeCrack :: First();
    AptitudeCrack :: Second(5);
    AptitudeCrack :: Display();
    return 0; 
}

A The program will report compile time error.

B 5

C 0

D 15

E 10

Q7:
What will be the output of the following program?
#include<iostream.h> 
class AptitudeBase
{
    public:
        float x; 
}; 
class AptitudeDerived : public AptitudeBase
{
    public: 
        char ch; 
        void Process()
        {
            ch = (int)((x=12.0)/3.0);
        }
        void Display()
        {
            cout<< (int)ch;
        } 
}; 
int main()
{
    class AptitudeDerived  *objDev = new AptitudeDerived;
    objDev->Process();
    objDev->Display();
    return 0; 
}

A The program will print the ASCII value of 4.

B The program will print the output 4.

C The program will print the output garbage.

D The program will print the output 0.

Q8:
Which of the following statement is correct about the program given below?
#include<iostream.h>
#include<process.h> 
class AptitudeCrack
{
    static int x; 
    public:
    AptitudeCrack()
    {
        if(x == 1)
            exit(0); 
        else
            x++;
    }
    void Display()
    {
        cout<< x << ' ';
    }
};
int AptitudeCrack::x = 0; 
int main()
{
    AptitudeCrack objAptitude1; 
    objAptitude1.Display(); 
    AptitudeCrack objAptitude2; 
    objAptitude2.Display(); 
    return 0; 
}

A The program will print the output 0 1.

B The program will print the output 1 2.

C The program will report compile time error.

D The program will print the output 1 1.

E The program will print the output 1.

Q9:
Which of the following statement is correct about the program given below?
#include<iostream.h> 
class AptitudeBase
{
    int x, y; 
    public:
    AptitudeBase(int xx = 10, int yy = 10)
    {
        x = xx;
        y = yy;
    }
    void Show()
    {
        cout<< x * y << endl;
    }
};
class AptitudeDerived : public AptitudeBase
{
    private:
        AptitudeBase objBase; 
    public:
    AptitudeDerived(int xx, int yy) : AptitudeBase(xx, yy), objBase(yy, yy)
    {
        objBase.Show();
    }
};
int main()
{
    AptitudeDerived objDev(10, 20);
    return 0; 
}

A The program will print the output 100.

B The program will report compile time error.

C The program will print the output 200.

D The program will print the output Garbage-value.

Q10:
Which of the following statement is correct about the program given below?
#include<iostream.h> 
class AptitudeBase
{
    int x, y; 
    public:
    AptitudeBase(int xx = 10, int yy = 10)
    {
        x = xx;
        y = yy;
    }
    void Show()
    {
        cout<< x * y << endl;
    }
};
class AptitudeDerived : public AptitudeBase
{
    private:
        AptitudeBase objBase; 
    public:
    AptitudeDerived(int xx, int yy) : AptitudeBase(xx, yy), objBase(yy, yy)
    {
        objBase.Show();
    }
};
int main()
{
    AptitudeDerived objDev(10, 20);
    return 0; 
}

A The program will print the output 200.

B The program will report compile time error.

C The program will print the output 100.

D The program will print the output Garbage-value.