comp sci done

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/139

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

140 Terms

1
New cards

while Statement

A loop control statement that executes a block of code as long as a specified condition is true.

2
New cards

do-while Statement

A loop control statement that executes a block of code at least once before checking a specified condition at the end of the loop.

3
New cards

for Statement

A loop control statement that allows for concise initialization, condition-checking, and iteration in a single line.

4
New cards

Infinite Loop

A loop that continues indefinitely, usually due to a condition that never evaluates to false.

5
New cards

String Operation Functions

Pre-defined functions in programming used for reading, comparing, and processing string data.

6
New cards

strcmp()

A function that compares two strings and returns an integer indicating their relationship.

7
New cards

strlen()

A function that calculates and returns the length of a given string, excluding the null terminator.

8
New cards

Loop Counter

A variable that keeps track of the number of iterations within a loop.

9
New cards

Branching

A method in programming that allows decision making via conditions, often implemented using if-else statements.

10
New cards

Relational Operators

Symbols that express comparisons between values, such as

11
New cards

Logical Operators

Operators used to form complex Boolean expressions, including AND (&&), OR (||), and NOT (!).

12
New cards

If-else statement

A conditional branching statement that executes one block of code if a condition is true, and another block if it is false.

13
New cards

Nested if Statements

An if statement inside another if statement, allowing for multiple levels of condition checking.

14
New cards

Boolean Data Type

A data type with only two possible values: true or false.

15
New cards

Compound Statements

A group of statements that can be executed together, often enclosed in braces {}.

16
New cards

Switch Statement

An alternative for multiple if-else conditions that selects one block of code to execute based on the value of a variable.

17
New cards

Evaluation of Relational Operators

The process of determining the truth value of relational expressions, which results in 1 (true) or 0 (false).

18
New cards

Precedence Rules

The order in which operators in an expression are evaluated, affecting the result of the expression.

19
New cards

Conditional Statement

A statement in programming that executes different actions based on whether a specified condition is true or false.

20
New cards

Branching

The process of executing different parts of a program based on the evaluation of conditions.

21
New cards

One-way Selection

A type of conditional statement that executes a single block of code if the condition is true, without an alternative block for false conditions.

22
New cards

Nested if Statements

An if statement placed inside another if statement, allowing for multiple levels of conditional logic.

23
New cards

Nested If Statements

An if statement placed inside another if statement, allowing for multiple layers of conditions.

24
New cards

One-Way Selection

An if statement that executes a block of code only if its condition is true, without an else clause.

25
New cards

Multibranch If-Else Statements

A structure that allows multiple possible paths of execution based on different conditions.

26
New cards

Logical NOT

An operator that inverts the truth value of an expression, converting true to false and vice versa.

27
New cards

Boolean Data Type

A datatype that can hold one of two values: true or false.

28
New cards

Input/Output

The process of taking user input and displaying outputs based on program logic and conditions.

29
New cards

Data types

Classifications of data items that tell the compiler or interpreter how the programmer intends to use the data.

30
New cards

define directive

A preprocessor directive used in C to define a macro, replacing the identifier with a specified replacement text.

31
New cards

Constant variable

An initialized variable whose value cannot change after it has been set.

32
New cards

Type conversion

The process of converting a variable from one data type to another.

33
New cards

Primitive types

Basic data types built into the programming language, such as int, char, and float.

34
New cards

Built-in Math functions

Predefined functions in C that perform mathematical operations, like sqrt and pow.

35
New cards

Operator Precedence

The rules that determine the order in which different operators are evaluated in expressions.

36
New cards

User input

Data that a program receives from the user during execution.

37
New cards

Implicit conversion

Automatic conversion performed by the compiler when changing data types, such as from int to double.

38
New cards

Looping Structures

Programming routines that implement repetitive tasks.

39
New cards

while Statement

A control structure that executes a block of code repeatedly as long as the condition evaluates to true.

40
New cards

do-while Statement

A control structure that executes a block of code at least once before checking the condition at the end of the loop.

41
New cards

for Statement

A control structure that is used for repetitive tasks with a predetermined count, typically more concise than while statements.

42
New cards

count Variable

A loop control variable that determines how many times the loop will execute.

43
New cards

infinite loop

A loop that continues indefinitely because its terminating condition is never met.

44
New cards

strcmp()

A function that compares two strings character by character.

45
New cards

strlen()

A function that calculates the length of a string, excluding the null character.

46
New cards

fgets()

A function that reads a line of text from a terminal or file.

47
New cards

Checkpoint

A condition that determines whether the loop should continue executing or terminate.

48
New cards

Buffer Length

The maximum number of characters that can be read into a string variable.

49
New cards

Null Character

A special character ‘\0’ used to indicate the end of a string in C/C++.

50
New cards

Input from Standard Input

Data that is received by the program, typically via keyboard or terminal.

51
New cards

include

Preprocessor directive to include the Standard Input Output library in a C program.

52
New cards

Constant variable

An initialized variable whose value cannot change after its initial assignment.

53
New cards

Type casting

The conversion of one data type to another, such as from int to double.

54
New cards

Primitive data types

Basic data types provided by C, such as char, int, float, and double.

55
New cards

Built-in Math functions

Functions that perform mathematical operations, like sqrt for square root.

56
New cards

Format specifiers

Used in printf and scanf to define the type of data being handled.

57
New cards

Implicit conversion

Automatic conversion of data types by the compiler when needed.

58
New cards

User-defined type

A type defined by the user in C, such as structs or unions.

59
New cards

Data type sizes

Discusses the size and memory allocation for different data types in C.

60
New cards

Fixed Constants

Constants defined using the #define directive which are substituted by values.

61
New cards

Variable declaration statement

A statement that defines a variable's name and type.

62
New cards

Output statement

A command used to display information to the console.

63
New cards

User input retrieval

The process of receiving input from the user in a program.

64
New cards

Data Types

Classifications of data that tell the compiler or interpreter how the programmer intends to use the data.

65
New cards

Variables

Named storage locations in memory that can hold different values during the execution of a program.

66
New cards

Arithmetic Operations

Mathematical calculations performed using operators such as addition, subtraction, multiplication, and division.

67
New cards

Interpreter

A program that executes instructions written in a programming or scripting language without requiring them to have been compiled into machine language.

68
New cards

Algorithm

A step-by-step procedure for solving a problem or performing a task.

69
New cards

Source Code

The human-readable instructions and statements written in a programming language.

70
New cards

Machine Code

Low-level code that is directly executed by the computer's CPU.

71
New cards

High-Level Language (HLL)

A programming language that is more abstract than assembly or machine code, making it easier for humans to read and write.

72
New cards

printf

A standard library function in C used to output formatted text to the console.

73
New cards

Variable Declaration

The process of defining a variable's type and name before using it in a program.

74
New cards

Function Header

The line in a function that specifies the function's name, return type, and parameters.

75
New cards

Identifier

A name given to a variable, function, or other user-defined item in a program.

76
New cards

Keyword

Reserved words in a programming language that have special meaning and cannot be used as identifiers.

77
New cards

Common Programming Errors

Frequent mistakes made by programmers such as syntax errors and logical errors.

78
New cards

Arithmetic Operation Example

Calculating the sum of numbers using n(a+b)/2 formula.

79
New cards

FILE*

A pointer to a FILE structure that allows programs to read and write to files.

80
New cards

fprintf()

The function used to write a sequence of characters to a file.

81
New cards

fscanf()

The function used to read a sequence of characters from a file.

82
New cards

stdin

A predefined FILE* that is pre-associated with a system's standard input, usually the keyboard.

83
New cards

stdout

A predefined FILE* that is pre-associated with a system's standard output, usually the computer screen.

84
New cards

Input parsing

The process of analyzing a string or text into logical syntactic components.

85
New cards

scanf()

A function used to read formatted input from the standard input.

86
New cards

sscanf()

A function used to read formatted input from a string rather than from standard input.

87
New cards

Format specifiers

Special characters within the format string of scanf() that define how input is read.

88
New cards

Buffer

A temporary storage area that holds data before it is processed.

89
New cards

Code memory

The region where the program instructions are stored.

90
New cards

Static memory

The region where global variables and static local variables are allocated, which remain in the same memory location throughout the duration of a program's execution.

91
New cards

Stack

The memory region where function's local variables are allocated during a function call and automatically deallocated upon returning from the function.

92
New cards

Heap

The memory region where dynamic memory allocation occurs, using functions like malloc and free.

93
New cards

Struct

A construct that defines a new type to group related variables, known as data members.

94
New cards

Typedef

A keyword used to create a new name for an existing type.

95
New cards

Member access operator

The '.' operator used to access a struct's data members.

96
New cards

malloc()

A function used to allocate memory dynamically for a variable of a struct type.

97
New cards

Returning multiple values

The capability of a struct to return multiple values from a function in a single entity.

98
New cards

Data member

Each subitem within a struct, which can be of any type.

99
New cards

What is a string in programming terms?

A sequence of characters stored in a char array.

100
New cards

How does a string in a char array signify its end?

It must end with a null character, written as '\0'.