1
Q:

What is the output of this program ?

       #include
        using namespace std;
        int n(char, int);
        int (*p) (char, int) = n;
        int main()
        {
            (*p)('d', 9);
            p(10, 9);
            return 0;
        }
        int n(char c, int i)
        {
            cout << c <<  i;
            return 0;
        }

A) d99 B) d9d9
C) d9 D) compile time error

Answer:   A) d99



Explanation:

In this program, we have declared the values as integer instead of character, So it is printing as d99 but it will not arise an error.

Subject: C++
Q:

Pick out the correct method in the c++ standard library algorithm.

A) mismatch B) maximum
C) minimum D) None of these
 
Answer & Explanation Answer: A) mismatch

Explanation:

It is a method in the search opertion in standard library algorithms.

Report Error

View Answer Report Error Discuss

Filed Under: C++

2 4283
Q:

What is mandatory for designing a new container?

A) Classes B) Iterators
C) Container D) None of these
 
Answer & Explanation Answer: B) Iterators

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: C++

0 4853
Q:

How many items are presented in the associate container?

A) 2 B) 3
C) 4 D) 5
 
Answer & Explanation Answer: D) 5

Explanation:

There are 5 items presented in the associate container. They are set, multiset, map, multimap and bitset.

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 3375
Q:

What does the sequence adaptor provide?

A) Insertion B) Deletion
C) Interface to sequence container D) None of thse
 
Answer & Explanation Answer: C) Interface to sequence container

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: C++

1 3218
Q:

What do vectors represent?

A) Static arrays B) Dynamic arrays
C) Stack D) Queue
 
Answer & Explanation Answer: B) Dynamic arrays

Explanation:

Vectors are sequence containers representing arrays that can change in size.

Report Error

View Answer Report Error Discuss

Filed Under: C++

0 5583
Q:

How the member functions in the container can be accessed?

A) Iterator B) Indirect
C) Both a & b D) None of these
 
Answer & Explanation Answer: A) Iterator

Explanation:

The container manages the storage space for its elements and provides member functions to access them, either directly or through iterators which reference objects with similar properties to pointers.

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 4618
Q:

Which is best for coding the standard libary for c++?

A) no trailing underscores on names B) complex objects are returned by value
C) have a member-swap() D) All of the mentioned
 
Answer & Explanation Answer: D) All of the mentioned

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: C++

1 2868
Q:

To which type of class, We can apply RTTI?

A) Encapsulation B) Polymorphic
C) Derived D) None of these
 
Answer & Explanation Answer: B) Polymorphic

Explanation:

RTTI is available only for classes which are polymorphic, which means they have at least one virtual method.

Report Error

View Answer Report Error Discuss

Filed Under: C++

0 7486