TERM 2 CO1 CSS 2

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

1/59

encourage image

There's no tags or description

Looks like no tags are added yet.

60 Terms

1
New cards

statements are written in order to accomplish a specific activity.

sequential programming

2
New cards

are expressions that evaluate to either true or false

conditionals

3
New cards

is used to describe a situation in which a sequence of instructions can be executed multiple times

iterative

4
New cards

contains declarations of functions, classes, and other program components that can be used in a C++ program.

header file

5
New cards

Input and output operations

iostream

6
New cards

String data type and operations

<string>

7
New cards

Mathematical functions

cmath

8
New cards

Output formatting

iomanip

9
New cards

file handling

fstream

10
New cards

is the starting point of program execution.

The main() function

11
New cards

is a named storage location used to hold data that may change during program execution.

variable

12
New cards

is a value that cannot be changed after it has been initialized.

constant

13
New cards

is the name given to variables, functions, classes, and other program elements.

identifier

14
New cards

are symbols used to perform operations on variables and values.

operators

15
New cards

={ ||, &&, !}

logical operaotrs

16
New cards

(++, -- , example x++ or x--)

increment and decrement operators

17
New cards

perform operations on individual bits of integer values. (&, |, ^, ~, <<, >>)

bitwise operators

18
New cards

is a block of code designed to perform a specific task. It allows programmers to organize instructions into smaller, reusable sections of a program.

function

19
New cards

returnType functionName(parameterList) {

    // Statements

    return value;

basic structure of function

20
New cards

Informs the compiler about the function's name, return type, and parameters.

function declaration

21
New cards

Contains the actual instructions of the function.

function definition

22
New cards

Executes the function.

function calling

23
New cards

Variables declared in the function definition.

Receive the values.

Example: int a, int b


parameters

24
New cards

Actual values passed when calling a function.

Supply the values.

Example: 10, 20


arguements

25
New cards

This function does not receive any information and does not return a value.

Function Without Parameters and Without Return Value

26
New cards

This function receives values but does not return a result.

Function With Parameters and Without Return Value

27
New cards

This function does not receive any information but returns a value.

Function Without Parameters but With Return Value

28
New cards

This function receives values, performs a task, and returns a result.

Function With Parameters and With Return Value

29
New cards

These operators compare two values.

relational operators

30
New cards

{=-*/ %}

arithmetic operators

31
New cards

is a data structure that allows programmers to store multiple values of the same data type using a single variable name.

array

32
New cards

Instead of declaring several variables individually, we can use an array to organize and manage related data more efficiently.

array

33
New cards

is an array that stores elements in a single sequence or list.

one dimensional

34
New cards

The general syntax for declaring an array is:

dataType arrayName[arraySize];

35
New cards

explanation of array

dataType arrayName[arraySize];


dataType – specifies the type of values to store.

arrayName – the name given to the array.

arraySize – specifies the number of elements

36
New cards

means assigning initial values to the elements of an array.

array initialization

37
New cards

means retrieving or using individual values stored in an array.

Accessing array elements

38
New cards

is commonly used to process array elements.

It allows programmers to access each element automatically without writing separate statements.

for loop

39
New cards

is called simple if variables of that type can store only one value at a time

data type

40
New cards

is one in which each data item is a collection of other data items

structured data type

41
New cards

a collection of a fixed number of components wherein all of the components have the same data type

array

42
New cards

the array subscripting operator

[]

43
New cards

The array index always starts at

0

44
New cards

is any expression whose value is a nonnegative integer

index

45
New cards

•collection of a fixed number of components (of the same type) arranged in two dimensions

–Sometimes called matrices or tables

two-dimensional array

46
New cards

is the memory address of a variable

pointer

47
New cards

computer’s memory is divided into numbered memory locations called

bytes

48
New cards

is a construct that gives you more control of the computer’s memory.

pointer

49
New cards

means "the variable located at the address"

*

50
New cards

means "the address of the variable

&

51
New cards

Type_Name   Variable_Name1, Variable_Name2,. . .;

syntax of pointers

52
New cards

creates a new dynamic variable of a specified type and returns a pointer that points to this new variable.

new operator

53
New cards

if there was insufficient available memory to create the new variable, then new returned a special value named

null

54
New cards

•A special area of memory

•Reserved for dynamically allocated variables

•Any new dynamic variable created by a program consumes some of the memory in this

freestore/heap

55
New cards

is a special constant pointer value that is used to give a value to a pointer variable that would not otherwise have a value.

null

56
New cards

Local variables are sometimes called ____ because their dynamic properties are controlled automatically for you.

automatic variables

57
New cards

Global variables are sometimes called ______because they are truly static in contrast to dynamic and automatic

variables

statically allocated variables

58
New cards

variables declared within a function definition

local variables

59
New cards

Variables created with the new operator are called ______ because they are created and destroyed while the program is running.

dynamic variables

60
New cards

are normally placed outside the body of the main part of your program and outside the body of other functions, typically near the start of a file. That way the typedef is global and available to your entire program.

type definitions