C++ Questions

Q:

Which among the following are not the c++ tokens

A) Identifiers B) keywords
C) Strings D) None
 
Answer & Explanation Answer: D) None

Explanation:

All the above listed options are c++ tokens .They  include:

             - keywords

             - Identifiers

             - Constants

             - Strings

             - operators

Report Error

View Answer Report Error Discuss

Filed Under: C++
Exam Prep: GATE

4 4524
Q:

Which of the following methods doesn't use sorting?

A) Insertion B) Deletion
C) Exchange D) Selection
 
Answer & Explanation Answer: A) Insertion

Explanation:

Using insertion we can perform insertion sort, using selection we can perform selection sort, using exchange we can perform the bubble sort.But by using deletion we cannot perform any sort.

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 4472
Q:

What is the kind of execution does sequence point allow?

A) Non-overlap B) Overlap
C) Concurrent D) None of these
 
Answer & Explanation Answer: A) Non-overlap

Explanation:

To resolve all the side-effects in the program, the sequence point should not be overlapped.

Report Error

View Answer Report Error Discuss

Filed Under: C++

2 4446
Q:

Which of the following type casts will convert an Integer variable named amount to a Double type ?

A) (int to double) amount B) int (amount) to double
C) int to double(amount) D) (double) amount
 
Answer & Explanation Answer: D) (double) amount

Explanation:
Report Error

View Answer Report Error Discuss

6 4400
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 4339
Q:

How many kinds of entities are directly parameterized in c++?

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

Explanation:

C++ allows us to parameterize directly three kinds of entities through templates: types, constants, and templates.

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 4160
Q:

How the different permutations are ordered in c++?

A) Compare lexicographicaly to each other elements B) By finding the highest element in the range
C) By finding the lowest element in the range D) None of the mentioned
 
Answer & Explanation Answer: A) Compare lexicographicaly to each other elements

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: C++

1 4062
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 4048