1/15
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
Truncation
When part of a value is discarded and permanently lost
Ex a float value in an int variable
Literal constant
Integer literal: 10
Character literal: ‘A’
String literal: “Larry is silly!”
Floating-point literal: 2.0 or 3.14f
Defined constant
#define keyword
Acts as a compiler instruction
Does not have a data type and does not occupy computer memory
Always in ALL CAPS
Ex #define MAX_STUDENTS 30
Memory constant
Read only variable stored in the computer’s physical memory
Declared using “const” and must be initialized with a value
CamelCase
Ex gasVolume or mixRatio
Syntax error
Violations of the grammatical and structural rules of the programming system
Won’t compile
Logical error
Flaws in the design or math of your algorithm
Produces wrong or unexpected results
Runtime errors
Occur while the program is actively executing, causing it to crash, stop running, or trigger a “core dump”
Frequently caused by memory violations or impossible mathematical optimizations
Source code
ASCII text file that is translated by a compiler into an executable program
Preprocessor directives
#define
#include
Inline comment
Multiline/block comment
// Author: …
/* string */
Precision
%5.2lf has a minimum width of 5
1 byte ram
16 bits
Data type
Determines the size of memory allocated to a variable and the operations that can be performed on it
Format specifiers
%s, %d, %f, or %c
Global variable
Declared outside of a function