Technical Questions asked in Hexaware

  1. Which of the following in the data structure in which insertion can place from any direction but deletion can only takes place from opposite direction:
    1. Stack
    2. Array
    3. Queue
    4. Tree

    Answer : Option B.
Wipro
  1. 7489 IC is a:
    1. 32 bit RAM
    2. 64 bit RAM
    3. 32 bit ROM
    4. 64 bit ROM

    Answer : Option B.
  2. Predict the output of following C++ program.
    #include
    using namespace std;
    class abc
    {
    static int x;
    public:
    abc() { x++; }
    static int getX() {return x;}
    };
    int Test::x = 0;
    int main()
    {
    cout << abc::getX() << " ";
    abc t[5]; cout << abc::getX(); }
    1. 55
    2. 55
    3. 05
    4. 50

    Answer : Option C.
    "abc::getX()" is a static function so it can be called without object. Since x is initialized as 0, the first call to getX() returns 0. As x++ in constructor and when an array of 5 objects is created, the constructor is called 5 times. So x is incremented to 5 before the next call to getX().
  3. Which of the following is true for B+ trees:
    1. B+ trees are for storing data on disk.
    2. On B+ trees range queries are faster.
    3. B+ trees are for secondary indexes.
    4. B+ trees are for primary indexes.

    Answer : Option B.
  4. Which of the following is not a function of aggregate function?
    1. Avg
    2. Count
    3. Create
    4. Max

    Answer : Option C.
    In the given context, option 4 is the most applicable.
  5. Which of the following is correct form of type-casting in C++?
    1. per=total/(float)m
    2. per=(float) total/m
    3. per=total/float(m)
    4. per=float(total/m)

    Answer : Option C.
Campus Placement ad
Rate Us
Views:58031