programming exam 1

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/15

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 8:28 PM on 10/12/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

16 Terms

1
New cards

Truncation

When part of a value is discarded and permanently lost

Ex a float value in an int variable

2
New cards

Literal constant

Integer literal: 10

Character literal: ‘A’

String literal: “Larry is silly!”

Floating-point literal: 2.0 or 3.14f

3
New cards

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

4
New cards

Memory constant

Read only variable stored in the computer’s physical memory

Declared using “const” and must be initialized with a value

5
New cards

CamelCase

Ex gasVolume or mixRatio

6
New cards

Syntax error

Violations of the grammatical and structural rules of the programming system

Won’t compile

7
New cards

Logical error

Flaws in the design or math of your algorithm

Produces wrong or unexpected results

8
New cards

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

9
New cards

Source code

ASCII text file that is translated by a compiler into an executable program

10
New cards

Preprocessor directives

#define

#include

11
New cards

Inline comment

Multiline/block comment

// Author: …

/* string */

12
New cards

Precision

%5.2lf has a minimum width of 5

13
New cards

1 byte ram

16 bits

14
New cards

Data type

Determines the size of memory allocated to a variable and the operations that can be performed on it

15
New cards

Format specifiers

%s, %d, %f, or %c

16
New cards

Global variable

Declared outside of a function