OOP Flashcards

1
Q

Need of operator overloading

A

Intuitive syntax
Expressive
Improved Usability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Exception handling statements

A

try
catch
throw
rethrow (rethrow current exception)
noexcept (void function name() noexcept{})

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Generic programming is done using -

A

Templates
Operator Overloading
Type traits
SFINAE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

List and vector

A

Vector (dynamic array like, contiguous storage, efficient ins/del, efficient random access)
List (doubly linked container, non-contiguous, efficient ins/del, less efficient random access)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Types of iterators

A

Input
Output
Forward
Bidirectional
Random Access

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Templates

A

Templates allow classes and functions to work with Diff data types… Allow generic programming

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Stream

A

Sequence of bytes that are transferred between program and i/p o/p devices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Stream error

A

cerr - inst of ostream, (unbuffered)
clog - inst of ostream (buffered)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are file pointers?

A

objects of file which help to manipulate
seekg() - Moves the get pointer (for reading) to a specified position.
seekp() - Moves the put pointer (for writing) to a specified position

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Command Line arguments

A

Command line arguments are parameters or options passed to a program when it is executed from the command line or terminal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is STL

A

collection of stand template classes and functions which allow data structure implementation
It also provides iterators and functors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are containers?

A

component of STL in which object/data is stored according to requirement.
stores operations too.
implemented at Template class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what are algorithms

A

generic function which is responsible for searching, sorting, comparing and editing
Manipulative (modifies element - reverse, copy, replace, swap)
Non manipulative (operates on elements - max, min, count, find)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Typename and export keyword

A

Typename - specify type, to avoid ambiguity in template metaprogramming
Export - to avoid multiple instantiations in the program, make available to various lib outside template lib

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Formatted and unformatted i/p and o/p

A

interpret according to format provided - cin, cout
perform raw i/p and o/p functions without interpretting - get char() gets()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Advantages of container adapters

A

code readability
simplified interface
intuitive syntax
improved memory usage
enhanced performace