Programming 1A - Fundamental Concepts

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

1/49

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering core introductory computer science, procedural programming concepts, C++ basics, hardware, and data types from Programming 1A.

50 Terms

1
New cards

Procedural programming

A programming approach that organises code into procedures/functions executing tasks step by step.

2
New cards

Core principle of procedural programming

Breaking a problem into ordered steps or procedures that perform specific tasks.

3
New cards

Algorithm

A finite, ordered set of steps for solving a problem.

4
New cards

Source code

Human-readable instructions written in a programming language.

5
New cards

Compiler

Translates source code into another form, often machine code/executable, before execution.

6
New cards

Interpreter

Reads/translates and executes program instructions as the program runs.

7
New cards

Compiler vs. Interpreter (Key Difference)

A compiler translates ahead into a target program; an interpreter executes instructions during runtime.

8
New cards

Five main computer hardware components

Input, output, CPU, main memory (RAM), and secondary storage.

9
New cards

Input devices (examples)

Keyboard and mouse (also scanner, microphone, webcam).

10
New cards

Output devices (examples)

Monitor and printer (also speakers).

11
New cards

CPU (Central Processing Unit)

The central processing unit; it executes instructions and processes data.

12
New cards

RAM (Main Memory)

Temporary, volatile memory used to hold data/programs currently in use.

13
New cards

Volatile memory

Memory whose contents are lost when power is turned off.

14
New cards

Secondary storage

Long-term storage such as an SSD or hard drive; it retains data without power.

15
New cards

Binary

A base-2 number system using only 0 and 1.

16
New cards

Binary place values (8-bit number, left to right)

128, 64, 32, 16, 8, 4, 2, 1.

17
New cards

Binary to decimal conversion method

Multiply each bit by its place value and add the results.

18
New cards

Decimal equivalent of binary 00001101

8+4+1=138 + 4 + 1 = 13.

19
New cards

ASCII

American Standard Code for Information Interchange; a character encoding standard.

20
New cards

ASCII decimal code for uppercase 'A'

65.

21
New cards

ASCII decimal code for lowercase 'a'

97.

22
New cards

SRS (Software Requirements Specification)

A document describing what the software must do and its requirements.

23
New cards

Four common sections of an SRS

Introduction/purpose, overall description, functional requirements, non-functional requirements (sections vary by template).

24
New cards

Functional requirements

Statements describing actions or services the system must provide.

25
New cards

Non-functional requirements

Quality or constraint requirements such as performance, security, usability, or reliability.

26
New cards

Variable

A named storage location whose value may change while the program runs.

27
New cards

Named constant

A named value intended not to change; in C++ it is declared using const.

28
New cards

Constant declaration in C++ (Syntax Example)

Example: const double TAX = 0.15;

29
New cards

Assigning to a const variable

Causes a compile-time error.

30
New cards

Integer (int)

A data type for whole numbers, without a fractional part.

31
New cards

Double

A floating-point type commonly used for decimal values with more precision than float.

32
New cards

Char

A type that stores a single character, such as 'A'.

33
New cards

Bool

A Boolean type that stores true or false.

34
New cards

String

A sequence of characters used to represent text.

35
New cards

Initialization

Giving a variable its starting value when it is declared.

36
New cards

Assignment

Giving or changing a variable's value using the assignment operator =.

37
New cards

Difference between = and ==

= assigns a value; == compares two values for equality.

38
New cards

Function

A named block of code designed to perform a task and optionally return a value.

39
New cards

Reasons to use functions

Reuse code, divide a problem into smaller parts, improve readability, and simplify testing.

40
New cards

Function call

An instruction that invokes/executes a function.

41
New cards

Parameter

A variable listed in a function definition that receives an input value.

42
New cards

Argument

The actual value or variable supplied when calling a function.

43
New cards

Return value

The value a value-returning function sends back to its caller.

44
New cards

void (return type)

Indicates that the function does not return a value.

45
New cards

return statement

Ends the function and sends back its specified value, if applicable.

46
New cards

Local variable

A variable declared within a function/block; available only within its scope.

47
New cards

Global variable

A variable declared outside functions, generally accessible throughout its scope in the file/program.

48
New cards

Issues with global variables

They can cause hidden dependencies, unintended changes, and make code harder to debug/maintain.

49
New cards

Pass by value

The function receives a copy; changing the parameter does not change the caller's original variable.

50
New cards

Pass by reference

The function receives an alias/reference; changes through it can affect the caller's original variable.