terms I need to study for the final exam Flashcards

1
Q

aggregate construct

A

allows the manipulation of several data items as a whole

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

examples of aggregate construct

A

classes, structures, arrays, vectors, strings, matrices

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

what is the default access modifier for a structure

A

public

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

what is the default access modifier for a class

A

private

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

do you need a semicolon at the end of a structure?

A

yes

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

do you need a semicolon at the end of a class?

A

yes

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

can structure variables be directly compared? (using ==)

A

NO

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

identifiers

A

give a variable its type

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

do you pass objects to the copy constructor by value or by reference during program execution?

A

by value

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

do you pass objects to the copy constructor by value or by reference in the copy constructor prototype?

A

by reference

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

how to delete a pointer that is an array?

A

delete [] pointerName;

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

how do you see the size of the vector?

A

vectorName.size()

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

complex structures

A

an instance (object) of a structure in another structure

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

to assign a pointer to a variable’s address

A

int *p = &x;

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

how to declare a class with simple inheritence

A

class ChildClassName : (public, private, or protected) ParentClassName {};

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

how to declare a class with multilevel inheritance

A

class ParentClass : public GrandparentClass{};

class ChildClass : public ParentClass {};

**the child class has access to both the parent class and the grandparent class

17
Q

how to declare a class with multiple inheritance

A

class ChildClass : public ParentOneClass , public ParentTwoClass {};

**use a comma to separate the class names and access modifiers