COMSCI 1200

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/21

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.

22 Terms

1
New cards

array

A kind of data structure that can store multiple values of the same data type using a single variable and is used to store a collection of data.


2
New cards

index.

Accesses a specific element in an array.

3
New cards

Initializing Arrays

refers to declaring an array alongside the data that it will contain.

4
New cards

Base Index

Refers to the 1st element of an array with an index of zero [0].

5
New cards

Sorting

a process of ordering individual elements of a list according to their proper rank, either in ascending or descending order.


6
New cards

Bubble Sort

works by comparing each array element compared to every other array element.

If a value is larger / smaller than another, the values are swapped.

7
New cards

Two-Dimensional Array

The simplest form of multidimensional array, it is a list of one-dimensional arrays.

8
New cards

data type array Name [rows][columss];

Syntax: Two-Dimensional Array

9
New cards

Three-Dimensional Array

Is a collection of 2D arrays


10
New cards

as a pointer

as a sized Array

As an unsized away

There are 3 ways to pass a single-dimension array as an argument to functions by declaring them as formal parameters

11
New cards

strings

is a data type used in programming, such as an integer

and floating-point unit, but is used to represent text/character

rather than numbers.

12
New cards

strings

is comprised of a set of characters treated as a single unit that

can also contain spaces and numbers.

13
New cards

strings

is an array of characters ending in the null character

(‘\0’).

14
New cards

scanf

function only takes the first entered word. The

function terminates when it encounters a white space (or just space).

15
New cards

strlen()

strcpy()

strcmp()

strcat()

the commonly used string functions and are

defined in the ‘#include<string.h>’ header file/string library:

16
New cards

strlen()

calculates the length of a given string.

17
New cards

strlen()

function takes a single argument, i.e, the string variable

whose length is to be found, and returns the length of the string

passed.

18
New cards

strcpy()

copies the string to another character array.

19
New cards

Strcpy()

copies the string pointed by source

(including the null character) to the character array destination,

which returns the character array destination.

20
New cards

strcmp()

compares two strings and returns 0 if both

strings are identical.

21
New cards

strcmp()

compares two strings character by character. If the

first character of two strings are equal, next character of two

strings are compared. This continues until the corresponding

characters of two strings are different or a null character '\0' is

reached.

22
New cards

strcat()

compares two strings character by character. If the

first character of two strings are equal, next character of two

strings are compared. This continues until the corresponding

characters of two strings are different or a null character '\0' is

reached.