C Programming Concepts

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, strings, characters, math functions, pointers, linked lists, structures, 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 data structure that stores elements in a table format.

3
New cards

Three-Dimensional Array

A data structure that can be visualized as a table within a table.

4
New cards

Bubble Sort

A sorting algorithm that compares adjacent elements and swaps them if they are in the wrong order, effectively 'bubbling' the largest elements to the top.

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

Linear Search

A sequential searching algorithm that checks every element of the list until the desired element is found.

7
New cards

Binary Search

An interval searching algorithm that repeatedly divides the sorted list into two equal parts and searches for the item in the relevant part.

8
New cards

Function

A program that returns a value (unless declared as void).

9
New cards

Pre-defined functions

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

10
New cards

User-defined functions

Functions created by the programmer for a special purpose.

11
New cards

Function Prototyping

Declaring the function to the program, including the number and type of arguments and the return type.

12
New cards

Call by Value

Passing the actual value/s (argument/s) to the called function.

13
New cards

Call by Reference

Passing the address/es of the actual parameter/s to the called function.

14
New cards

strcpy(string1, string2)

Copies the content of string2 to string1.

15
New cards

strcat(string 1, string2)

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

16
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.

17
New cards

stricmp(string1, string2)

Compares two strings while ignoring cases.

18
New cards

strlwr(string)

Converts the string to lowercase.

19
New cards

strupr(string)

Converts the string to uppercase.

20
New cards

strchr(string,c)

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

21
New cards

strlen(string)

Returns the length of the string.

22
New cards

strrev(string)

Reverses all characters except the null terminator in the string.

23
New cards

isalnum(int ch)

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

24
New cards

isalpha(int ch)

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

25
New cards

isdigit(int ch)

Returns non-zero if ch is a digit from 0-9.

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

Pointer

Declared by specifying its name and type, with an asterisk (*) symbol added before the pointer’s name.

30
New cards

Linked List

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

31
New cards

Single Linked List

Navigation is Forward Only.

32
New cards

Doubly Linked List

Forward and Backward Navigation is Possible.

33
New cards

Circular Linked List

Last element is linked to the first element.

34
New cards

Self Referential structures

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 (fields with different data types grouped together).

36
New cards

Passing Structures to Functions

Sending all necessary data together in one package to a function.

37
New cards

Pointers

Allow you to work with the memory address of a structure.

38
New cards

Linked List of Structures

A way of storing a list of data using structures and pointers, where nodes can be anywhere in memory and each node points to the next one.

39
New cards

File Handling

How we store the available data or info in a file with the help of a program.

40
New cards

Text Mode

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

41
New cards

Binary Mode

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

42
New cards

Text Files

Contains data in the form of characters and each line ends with a new line character ('\n').

43
New cards

Binary Files

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

44
New cards

File Pointer

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

45
New cards

fopen()

Opens a file and associate a stream with it.

46
New cards

File opening modes

Specifies the allowed operations on the file to be opened.

47
New cards

rename(old filename, new filename)

Renames a file.

48
New cards

remove(filename)

Deletes a file.