Technical Questions asked in Motorola

  1. ____________allows for these paration of object interactions from classes and inheritance in to distinct layers of abstraction.
    1. Dispatching
    2. Loosening
    3. Decoupling
    4. Detaching
    Answer:  Option C.
  2. The least frequently used (LFU) page replacement algorithm requires
    1. the page with the smallest count to be replaced.
    2. the page with the longest count to be replaced.
    3. the page with the smallest count was brought in,yet to be used.
    4. the page with the longest count was brought in,yet to be used.
    Answer:  Option A
cognizant article ad
  1. What is meant by parametric polymorphism?
    1. A function or a data type can be written generically so that it can handle values identically without depending on their type
    2. A function or a data type can be written generically so that it can handle values identically being dependant on their type
    3. A function or a data type that can accept parameters
    4. Both(A)and(C)
    Answer: Option  A.
  2. Recursive functions are executed in a
    1. last in first out order
    2. first in first out order
    3. parallel order
    4. last in last out order
    Answer: Option  A.
    Explanation: during recursive function call contents are pushed/pop into/from stack. Stack work on the principle of LIFO.
  3. Follow the code snippet and chose the correct statement(s)
    Int m;
    void f2()
    {
    int m=1; // line1
    ::m=2; // line2
    m=2; //line3
    }
    1. The statement inline 1 throws a compilation error
    2. Inline 2, m=2 is assigned to the global m
    3. Inline 3, m=2 is assigned to the global m and line2 throws compilation error
    4. Both (a) and (b)
    Answer: Option  B.
  4. Assume that the Point class is existing with the following snippet in the header file
    Point.h:
    class Point
    { Point(); Pont(int, int); int GetX();
    int GetY();
    void SetX(int);
    void SetY(int);
    };
    If the objects of Point are created as Point oPointOne, oPointTwo(2,3); Which of the following statements are correct?
    (i) The statement oPointOne.SetX(20); will compile and run successfully.
    (ii) The statement oPointOne.SetX(20).SetY(30); will compile successfully but will give a run time error.
    1. Only (i) is correct
    2. Both (i) and (ii) are correct
    3. Both (i) and (ii) are incorrect
    4. Only (ii) is correct
    Answer: Option A
Campus Placement ad
Rate Us
Views:5297