C++ Deck 4 Flashcards
The meaning of this comparative operator: >
greater than
The meaning of this comparative operator: >=
greater than or equal to
The meaning of this comparative operator: !x
The NOT operator (negation) - returns true if x is false
(i.e. if the value is NOT x, then this statement will return TRUE)
The meaning of this comparative operator: x && y
The AND operator - true if BOTH x AND y are true
The meaning of this comparative operator: x II y
The OR operator - true if EITHER x OR y or BOTH are true.
True or False: The values in case labels must be constants.
True
True or False: The constants in a case label can be any data type.
False, they must be integer types.
(int, char, enumerations)
In the context of a switch statement, what does the break statement do?
It prevents other cases from being tested if the current one returns true.
What is the CPU?
Central Processing Unit
The “brain” of the computer.
What is the ISA?
Instruction Set Architecture
The specific set of low-level instructions available to a CPU.
What is the ALU?
Arithmetic & Logic Unit
Responsible for performing arithmetic calculations as well as logical operations (comparisons of equality and inequality, etc.)
What is the Main Memory (RAM)?
Random Access Memory
Storage close to CPU that is faster to access than the hard disk. It stores executing programs and data being currently worked on.
What is Secondary Memory?
SSD, Hard Disk, DVD, etc.
What are some examples of input devices?
Mouse, keyboard, scanner, network card, etc.
What are some examples of output devices?
Screen, console, printer, network card, etc.
What is a bit?
A binary digit which stores the value of 0 or 1. It is the smallest unit of storage in a computer.
What is a byte?
8 bits. Smallest addressable unit of storage in a computer.
Storage units (variables) in a program are 1 or more bytes.
Each byte in memory has an address (a number that identifies the location)
What is Machine Language?
The earliest programming languages in which instructions were written in binary representing low-level operations directly executed by the hardware. It was tedious and error-prone.
What is Assembly Language?
A programming language which consisted of mnemonic codes and symbolic representations for machine instructions, making programming more readable and manageable. Assembly language programs were translated into machine code using assemblers.
What are Procedural Languages?
Procedural languages (Fortran, COBOL) provided higher level abstraction which allowed instructions in a more human-readable form. They introduced control structures like loops and conditional statements.
What is Structured Programming?
Languages (Pascal, C) that emphasized structured control flow such as loops, conditionals, and subroutines. Enhanced program clarity, maintainability, and modularity.
What are object-oriented languages?
Languages (C++, Java) built on the concept of objects and classes. Promote encapsulation, inheritance, and polymorphism, enabling modular and reusable code. More natural representation of real-world concepts and complex systems.
What are modern programming languages?
Languages (C++, Python, JavaScript, C#) which continue to evolve and offer various paradigms such as functional programming and scripting. They provide extensive libraries, frameworks, and tools for rapid development supporting diverse domains like web, data science, and AI.
What are interpreted languages?
Source code run directly on an interpreter, a program that runs the code statements as they appear.