What is the difference between std::vector and std::list

Answer Posted / nashiinformaticssolutions

o Vector: Uses contiguous memory and supports random access.
o List: Uses linked nodes and is better for frequent insertions/deletions.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?

846


Define token in c++.

894


What is an operator function? Describe the function of an operator function?

849


Is c++ platform dependent?

833


You run a shell on unix system. How would you tell which shell are you running?

892


Is swift better than c++?

726


Is C++ case sensitive a) False b) Depends on implementation c) True

803


If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?

1241


How do you generate a random number in c++?

821


What is protected inheritance?

799


What are the unique features of C++.

777


Can I learn c++ as my first language?

845


What is function prototyping? What are its advantages?

810


What is heap sort in c++?

848


When do we run a shell in the unix system?

809