C Programming Review

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

1/47

flashcard set

Earn XP

Description and Tags

Flashcards for reviewing C programming concepts, including arrays, sorting, searching, functions, and file handling.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

48 Terms

1
New cards

One-Dimensional Array

A data structure that stores elements of the same data type in a linear arrangement.

2
New cards

Two-Dimensional Array

A table of elements.

3
New cards

Three-Dimensional Array

A table within a table.

4
New cards

Bubble Sort

A sorting algorithm that repeatedly compares and swaps adjacent elements if they are in the wrong order, causing larger elements to 'bubble' to the end of the array.

5
New cards

Shell Sort

A sorting algorithm that compares elements that are far apart and then gradually reduces the gap between them.

6
New cards

Balloon Sort

Elements move toward their correct position faster than Bubble Sort. Instead of adjacent swaps, it might move larger elements directly toward their final position.

7
New cards

Linear Search

A searching algorithm where we start from one end and check every element of the list until the desired element is found.

8
New cards

Binary Search

An interval searching algorithm that searches for an item in a sorted list by repeatedly dividing the list into two equal parts.

9
New cards

Function

A program that will return a value unless declared as void; control first checks the main() function and then branches out to the other functions specified in the program.

10
New cards

Pre-defined functions

Programs imbedded in the C Programming Language that are ready to use.

11
New cards

User-defined functions

Programs created by the programmer for a special purpose.

12
New cards

Function Prototyping

Declaring a function before it is used in a program, telling the compiler the number and type of arguments and the return type.

13
New cards

Call by Value

Actual values are passed to the called function, and processing is done within the function until a return statement is executed. Changes do not affect the original values.

14
New cards

Call by Reference

The addresses of the actual parameters are passed to the called function. Any changes made to the variables in the called function affect the original variables.

15
New cards

strcpy(string1, string2)

Copies the content of string2 to string1.

16
New cards

strcat(string 1, string2)

Concatenates the content of string1 and string2; assigns the concatenated string to string1 and leaves string2 untouched.

17
New cards

strcmp(string1, string2)

Compares string1 and string2 and returns an integer based on whether string1 is less than, equal to, or greater than string2.

18
New cards

stricmp(string1, string2)

Compares two strings while ignoring cases.

19
New cards

strlwr(string)

Converts the string to lowercase.

20
New cards

strupr(string)

Converts the string to uppercase.

21
New cards

strchr(string,c)

Returns a substring of string beginning at the first occurence of character c up to the end of the string.

22
New cards

strlen(string)

Returns the length of the string. Null is not counted.

23
New cards

strrev(string)

Reverses all characters except the null terminator in the string.

24
New cards

isalnum(int ch)

Returns a non-zero if its argument is either a letter of the alphabet or a digit.

25
New cards

isalpha(int ch)

Returns non-zero if ch is a letter of the alphabet. Otherwise, zero is returned.

26
New cards

abs()

Returns the absolute value of the integer number.

27
New cards

ceil()

Returns the smallest integer represented as double not less than num.

28
New cards

fabs()

Returns the float absolute value of num.

29
New cards

floor()

Returns the largest integer represented as double not greater than num.

30
New cards

pow()

Returns base raised to the exp power (base, exp).

31
New cards

Pointer

A variable that holds the memory address of another variable.

32
New cards

Linked List

A dynamic data structure used to store a sequence of elements, where each element (node) contains data and a pointer to the next node.

33
New cards

Singly Linked List

. A self-referential structure that is made up of nodes that consists of two parts

34
New cards

Self Referential structure

Structures that have one or more pointers which point to the same type of structure, as their member

35
New cards

Structure

A collection of related heterogeneous fields.

36
New cards

Referencing structure elements

Accessing or changing the values inside a structure.

37
New cards

Structures Within a Structure

A structure within a structure where the main structure contains a structure from another structure definition.

38
New cards

Passing a Structure to a Function (Call by Value)

Passing the entire structure to a function, where a copy of the structure is used, and changes do not affect the original structure.

39
New cards

Pointers to Structures

Allows you to work with the memory address of a structure, instead of directly manipulating the structure itself.

40
New cards

File Handling

Storing data in a file with the help of a program.

41
New cards

Text Mode

Value written to the file is the actual sequence of characters.

42
New cards

Text Files

File contains data in the form of characters and is generally used to store a stream of characters.

43
New cards

Binary Mode

Value written to the file is converted into a sequence of bytes.

44
New cards

Binary Files

File contains data in binary form (i.e. 0's and 1's) instead of characters.

45
New cards

File Pointer

A reference to a particular position in the opened file, used to perform file operations.

46
New cards

fopen() Function

Opens a file and associates a stream with it.

47
New cards

File Opening Modes

Specify the allowed operations on the file to be opened; passed as an argument to the fopen() function.

48
New cards

File Handling Operators

Functions used to open, read, write, create, close, delete, or search for a file.