C++ Deck 5 Flashcards
What are the five stages of software development?
- Requirements Gathering
- Design and Planning
- Implementation and Coding
- Testing and Quality Assurance
- Deployment and Maintenance
What is an algorithm?
A finite sequence of steps to perform a specific task.
What is the difference between Syntax and Semantics?
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.
What are the five steps of creation and execution of a C++ program?
- Create source code (write and store to disk)
- Preprocessor (first step of compilation)
- Complilation (syntax checking / object code)
- Linking (Link object code files with libraries)
- Execution (Program loaded into memory, usually RAM, CPU executes code instructions)
What is Object Code?
The machine code translation of the source code.
What is a C++ library?
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.
The two parts of a C++ library.
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.
What is an atomic data type?
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
What type of values can a bool store?
0 and 1 (true and false)
Memory Size: bool
1 byte*
- Could vary based on implementation
What type of value does a char store?
An integer type that is capable of storing a single character (alphabetical, numerical, or special) using their ASCII values.
Memory Size: char
1 byte
Signed and Unsigned: char
Signed: -128 to +127
Unsigned: 0 to 255
What values does a short store?
Integer type that stores small numeric values that do not have fractional parts.
Memory Size: short
2 bytes