STL Interview Questions and Answer C, C++,Java, Unix, Networking, Data Structure, STL, Unix Commands, Operating System
This is a free C, C++, Java, Unix, Networking, Data Structure, STL, Unix Commands, Operating System site, to help you to learn and sharpen your axe for interview.

 

STL Interview Question / Answers

____________________________________________________

The Standard Template Library (STL) is a software library partially included in the C++ Standard Library. It provides containers, iterators, algorithms, and functors. More specifically, the C++ Standard Library is based on the STL published by SGI. Both include some features not found in the other. SGI's STL is rigidly specified as a set of headers, while ISO C++ does not specify header content, and allows implementation either in the headers, or in a true library.

Cotainers

Containers are objects that hold other objects, and ther are d\several dirrferent types.Vector class defines a dynamic arrray, deque creates a double ended queue, nad list provides a liner list. These containers are called seqence containers.

Algorithms

Algorithms act on Containers. They provide the means by which you will manipulate the contents of containers.

Iterators

Iterators are objects that act, more or less, like pointers. They give you the ability to cycle through the contents of a container in much the same way that you would use a pointer to cycle through an array.

Iterator Access Allowed
Random access Store and retrieve values, elements may be accessed randomly

BidirectionalStore and retrieve values, Forward and backward moving

Forward Store and retrieve values.Forward moving only.

Input Retrieve , but not store values. Forward moving only

Output Store, But not retrieve values.Forward moving only

The Container Classes

Container Description

Bitset:- A set of bits.

Deque:- A double ended queue.

List:- A liner list.

Map:- Stores key/ value pair in which each key is associated with only one value.

Multimap:- Stores key / value pairs in which one key may be associated with two or more values.

Maultiset:-A set in which each element is not neccesarily unique.

Priority-queue:- A priority queue.

Queue:- A queue.

Set:- A set in which each element is unique.

Stack:- A stack.

Vector:- A dynamic array.