C++ Classes Flashcards

1
Q

Though functionally identical, what is the biggest difference between structs and classes?

A

Class defaults to private, while struct defaults to public

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

What is the difference in use case between structs and classes

A

Classes are best for data abstraction and inheritance, while best used for data grouping and access.

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

What are the two basic constructors?

A

Default (no args) and with input

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

What is the abbreviation of Constructor?

A

CTOR

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

What are the non-basic Constructors?

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

What is Uniform Initialization Syntax

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

How do you define a Class?

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

How do you define a Struct?

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

What is the “this” keyword?

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

What is the syntax for using the “this” keyword?

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

Out Placeholder

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

Out Placeholder

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

Out Placeholder

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

What is the constructor keyword “=default”?

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

What is the ctor keyword “=delete”?

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

What is Member Initialization?

A
17
Q

When does Member Initialization occur?

A
18
Q

What MUST be initialized?

A
19
Q

What is Constructor Delegation?

A
20
Q

What is a Default Value in classes / structs?

A
21
Q

What are Default Constructor Arguments?

A
22
Q

What is the limiting factor of Default Constructor Arguments?

A
23
Q

What is a const Variable?

A
24
Q

What is a const Method?

A
25
Q

What is reverse callstack order?

A
26
Q

How do const arguments work?

A
26
Q

What is a constant object?

A
27
Q
A