C++: Introduction Flashcards

1
Q

What are the file extensions used for c++ files?

A

cpp and hpp

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

What does the “this” keyword refer to?

A

a pointer to the current object.

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

What are static class members?

A

A member of the class that is shared by all objects of the class, can be an attribute or a method.

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

What is the difference between the size and the capacity of a vector container?

A

The size of a vector is the amount of elements it currently holds, the capacity refers to the number of elements that it can hold in its current state without having to reallocate memory.

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