[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Technical Discussion :: C++

28. What is meant by list?

Answer:

The list is another container that is popularly used. It supports bidirectional, linear list and provides an efficient implementation for deletion and insertion operation. Unlike a vector, which supports random access, a list can be accessed sequentially only.
Write some important member functions of the list class?

Function Task
Back() Gives a reference to the last element
Begin() Gives a reference to the first element
Clear() Deletes all the elements
Empty() Decides if the list is empty or not
End() Gives refernce to the end of the list
Erase() Deletes elements as specified
merge() Merge two ordered list
Insert() Insert elemements as specified
Pop_back() Deletes the last element
Pop_front() Deletes the first element
Push_back() Adds an element at the end
Push_front() Adds an element at the front

Asked In :: Sopra Steria

Post Your Answer Here:

Name *
Email
Alert me

Post Your Reply Here:

Report Error

Please Login First Click Here