1.

Which is best for coding the standard library for c++?(a) no trailing underscores on names(b) complex objects are returned by value(c) have a member-swap()(d) all of the mentionedI had been asked this question at a job interview.My enquiry is from Standard Library Design topic in division Class Hierarchies, Library & Containers of C++

Answer» RIGHT choice is (d) all of the mentioned

The best explanation: Best coding for the standard LIBRARY for c++ is:

-> No trailing UNDERSCORES on names

-> Complex OBJECTS are returned by VALUE

-> It should have a member-swap().


Discussion

No Comment Found

Related InterviewSolutions