C++ Deck 5 Flashcards

1
Q

What are the five stages of software development?

A
  1. Requirements Gathering
  2. Design and Planning
  3. Implementation and Coding
  4. Testing and Quality Assurance
  5. Deployment and Maintenance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is an algorithm?

A

A finite sequence of steps to perform a specific task.

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

What is the difference between Syntax and Semantics?

A

Syntax - the grammar of a language
Semantics - the meaning of the language

Syntax can be correct, but the meaning might not be, e.g. “The headphones ate the tree.” is grammatically correct, but makes no sense.

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

What are the five steps of creation and execution of a C++ program?

A
  1. Create source code (write and store to disk)
  2. Preprocessor (first step of compilation)
  3. Complilation (syntax checking / object code)
  4. Linking (Link object code files with libraries)
  5. Execution (Program loaded into memory, usually RAM, CPU executes code instructions)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Object Code?

A

The machine code translation of the source code.

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

What is a C++ library?

A

A file with several useful functions that has been published and accepted as a part of the language. Usually pre-compiled and made available to perform common tasks.

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

The two parts of a C++ library.

A

Interface (Header File containing declarations of items available in the library, usually with short descriptions. Accessible to the developer.)

Implementation (File containing the pre-compiled executable definitions or implementation of the functions listed in the interface. Only accessible to the compiler.

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

What is an atomic data type?

A

Only stores one piece of information that cannot be split into smaller parts while still retaining the meaning/value. They are the built-in types defined by the C++ language and have an associated size of bytes in memory.

Examples: bool, char, short, int, long, float, double, long double

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

What type of values can a bool store?

A

0 and 1 (true and false)

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

Memory Size: bool

A

1 byte*

  • Could vary based on implementation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What type of value does a char store?

A

An integer type that is capable of storing a single character (alphabetical, numerical, or special) using their ASCII values.

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

Memory Size: char

A

1 byte

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

Signed and Unsigned: char

A

Signed: -128 to +127
Unsigned: 0 to 255

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

What values does a short store?

A

Integer type that stores small numeric values that do not have fractional parts.

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

Memory Size: short

A

2 bytes

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

Signed and Unsigned: short

A

Signed: -32768 to +32767
Unsigned: 0 to 65535

17
Q

What value does an int store?

A

Standard integer type for numbers that do not have fractional parts.

18
Q

Memory Size: int

A

4 bytes

19
Q

Signed and Unsigned: int

A

Signed: -2^31 to 2^31-1 (about 2 billion)
Unsigned: 0 to 2^32-1 (about 4 billion)

20
Q

What values does long store?

A

Integer type for large whole numbers.

21
Q

Memory Size: long

A

8 bytes

22
Q

Signed and Unsigned: long

A

Signed: -2^63 to +2^63-1 (about 8 quintillion)
Unsigned: 0 to 2^64-1 (about 16 quintillion)

23
Q

What type of value does float store?

A

Floating point type that can hold fractional numerical data.

24
Q

Memory Size: float

A

4 bytes

25
Q

Signed or Unsigned: float

A

Signed/Unsigned: 3.4 x 10^-38 to 3.4 x 10^38