1/43
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
ALU
Arithmetic & Logic Unit: Part of the CPU that performs mathematical operations
CPU
Central Processing Unit: most important component; the part of the computer that actually runs programs
Logic Error
is a bug that causes a program to operate incorrectly but does not terminate or crash
Syntax Error
detected by the compiler and the program does not run
Preprocessor Directive
lines in a program that being with the character #, instructions for the preprocessor, #<iostream>
Reserved Words
words that already have a role in coding
Combined Assignment Operator
a combined assignment operator performs an operation on variable and assigns the result back to that variable in a single statement
Compiler
software program that translates code written in a high-level programming language to a lower level programming language
Executable Code
machine language instructions ready to run, including any needed-run-time library routines
Control Unit
Part of the CPU that coordinates all the computer’s operations
Source Code
Statements written by the programmer
Declaration
is a statement that introduces an identifier (such as a variable, function, class, or type) to the compiler or interpreter, specifying its name and type without necessarily allocating memory or providing implementation details.
Comment
is a piece of text that is ignored
Constant
refers to a value that remains unchanged throughout the execution of a program.
Overflow
occurs when the result of a computation exceeds the range that can be represented within a fixed number of bits.
High-Level Language
programming language closer to human language, such as C++, Python, or Javva
Low-Level Langauge
Used for communication directly with hardware, such as machine language or Assembly
Assignment
an assignment is the process of giving a value to a variable, allowing the program to store and manipulate data
Syntax
refers to the set of rules that defines the combination of symbols that are considered to be correct
Initialization
the preparation of a computer or similar device for operation, in which diagnostic tests are run and the operating system is loaded
RAM
Random Access Memory
Underflow
refers to a condition where a calculation results in a value that is smaller than the smallest representable number in a given data type.
Bit
1
Byte
8
long
like a line
int
integer no decimal
short
small amount
double
the biggest
float
the decimal can move
char
single character
string
multiple chars, text, longer than a double but reads it as texts, can’t hold number operations
bool
true or false
integer Division
discard any remainder
Valid Variable naming
no funky characters, no reserved words, has to start with a letter or underscore, no blank space between the words or characters.
setw
set the width of the output field
setprecision
like how many spots behind a decimal you want
fixed
the decimal point doesnt move
show point
to control the output format of floating-point numbers.
How do you make a variable
int ____ = __;
in put
»
out put
«
Division in code
int main() {
int a = 7, b = 2;
int result = a / b; // Integer division
cout << "7 / 2 = " << result << endl; // Output: 3
return 0;
the ending sequence
\end, /n, endl
Cin
// Output prompt using cout
cout << "Enter your name: ";
cin >> name; // Reads a single word into 'name'
cout << "Enter your age: ";
cin >> age; // Reads an integer into 'age'