CCC 120

studied byStudied by 12 people
5.0(2)
get a hint
hint

Loop

1 / 30

Tags and Description

31 Terms

1

Loop

A control structure that allows a statement or a group of statements to be executed several times

New cards
2

Initialization

conditions

body

change of state

What are the 4 components of a loop?

New cards
3

Accumulator

It is sum of the variables of the counter

New cards
4

For loop

It is a loop used to repeat a specific block of code a KNOWN number of times

New cards
5

while loop

It is a loop used to repeat a specific block of code an UNKNOWN number of times

New cards
6

do-while loop

A loops used when a block of code is needed o be executed at least once

New cards
7

False

True or false

In for (initialization; condition; dec) loop statement; the final value for the loop control variable should be greater than the initial value in order to execute the statements inside the for loop

New cards
8

True

True or False

In for (Initialization; condition; inc) loop statement; the initial value of the loop control varable should be less than the final value in order to execute the statements inside the for loop

New cards
9

Array

It is a collection of variable of the same type that are referenced by a common name.

New cards
10

Extraction

It is a function that accepts an array a and element of its index type i and returns an element of the array’s base type

ex: cout << a[i];

New cards
11

Storing

It accepts an array a, an element of its index type i, and an element of its base type x

ex: a[1]=4

New cards
12

300

How many elements can int name [30][10] store?

New cards
13

rows

in int name [30][10], what does 30 determine?

New cards
14

columns

in int name [30][10], what does 10 determine?

New cards
15

True

True or false

The index for a 2D array should always be an int

New cards
16

False

True or false

It is possible to run a 2D array using variables instead of int constants

ex: int name [a][b];

New cards
17

Functions

These are the building blocks in C language. It is a subroutine that containts one or more C statements that performs one or more tasks

New cards
18

Function definition

it is a set of instructions for perfoming a task

New cards
19

Local variable

  • A variable defined within a function

  • It cannot be recognized by other functions

New cards
20

Global variable

a variable declared outside of all functions and can be used in any part of the program

New cards
21

Formal Parameter

They are variables that are declared to ACCEPT the actual parameter values

New cards
22

Actual Parameter

They are values that are given or passed to the formal parameter

New cards
23

Function Header

What is A called?

<p>What is A called?</p>
New cards
24

Function Body

What is B called?

<p>What is B called?</p>
New cards
25

Function definition

What is C called?

<p>What is C called?</p>
New cards
26

Length()

A string function that counts how many characters are in a string

New cards
27

find()

a string function that finds a specific character or group of characters in a string

New cards
28

substr()

a string function that is used for extraction

New cards
29

insert()

a string function that inserts a word or character within a string

New cards
30

assign()

a string function that assigns a value to a string

New cards
31

concatenation/append

a string function that joins two or more strings together

New cards

Explore top notes

note Note
studied byStudied by 1054 people
Updated ... ago
4.3 Stars(7)
note Note
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 60 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 27 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 7 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 14112 people
Updated ... ago
4.7 Stars(67)

Explore top flashcards

flashcards Flashcard255 terms
studied byStudied by 7 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard74 terms
studied byStudied by 5 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard57 terms
studied byStudied by 22 people
Updated ... ago
5.0 Stars(5)
flashcards Flashcard32 terms
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard70 terms
studied byStudied by 35 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard63 terms
studied byStudied by 36 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard36 terms
studied byStudied by 12 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard73 terms
studied byStudied by 3433 people
Updated ... ago
4.3 Stars(28)