C++ Programming Questions Answers - Set 2

  • 36. Stacks are based on ?

    1. FIFO
    2. LIFO
    3. FILO
    4. All of above
    Answer And Explanation

    Answer: Option B

  • 37. An explicitly defined destructor function

    1. may be virtual
    2. may not be virtual
    3. will always be virtual
    4. will never be virtual
    Answer And Explanation

    Answer: Option A

  • 38. Queues are based on ?

    1. LIFO
    2. FIFO
    3. LILO
    4. FILO
    Answer And Explanation

    Answer: Option B

  • 39. int *ptr[5];

    1. a pointer of 5 int elements
    2. an array of 5 int pointers
    3. an array of 5 elements returning an int value
    4. none of above
    Answer And Explanation

    Answer: Option B

  • 40. When a structure refers to itself, it is known as ?

    1. encapsulated structure
    2. nested structure
    3. recursive structure
    4. self-referential structure
    Answer And Explanation

    Answer: Option D

  • 41. Destructors are called ?

    1. not defined
    2. in any order
    3. in the reverse order of constructor calls
    4. in the same order of constructor calls
    Answer And Explanation

    Answer: Option C

  • 42. The members of a class are ?

    b) by default are private
    c) are made private by declaring as private
    d) none of the above]

    1. have no visibility by default
    2. public by default
    3. private by default
    4. protected by default
    Answer And Explanation

    Answer: Option C