C Programming: Input, Output, Operators, and Control Structures

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

1/50

flashcard set

Earn XP

Description and Tags

Vocabulary practice flashcards covering formatted and unformatted I/O, operators, precedence, expressions, and control structures in C.

Last updated 8:22 PM on 10/9/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

51 Terms

1
New cards

Formatted I/O functions

Functions in C that allow for structured and controlled reading and writing of data using format specifiers to define data types and presentation.

2
New cards

printf()

A formatted output function that sends structured output to the standard output stream (usually the console) using a format string and variable list.

3
New cards

scanf()

A formatted input function that reads structured input from the standard input stream (usually the keyboard) and stores it into addresses of variables.

4
New cards

Control string

A string containing regular characters and format specifiers used within formatted functions like printf() and scanf() to dictate how data is interpreted, formatted, and displayed or read.

5
New cards

Format specifier

A symbol sequence starting with a percentage sign (%) followed by a character (such as %d, %f, or %s) indicating the data type and formatting method.

6
New cards

Escape sequence

A combination of characters starting with a backslash () used within string literals or character constants to represent special characters or perform specific formatting actions.

7
New cards

\n

An escape sequence representing a newline, which moves the cursor to the beginning of the next line.

8
New cards

\r

An escape sequence representing a carriage return, which moves the cursor to the beginning of the current line.

9
New cards

\a

An escape sequence representing an alert (bell) that produces an audible beep.

10
New cards

Unformatted I/O functions

Functions that read and display only character data types or character arrays/strings directly to and from the console without format specifiers.

11
New cards

getchar()

An unformatted I/O function declared in stdio.h that reads a single first character from the keyboard until the enter key is pressed.

12
New cards

putchar()

An unformatted I/O function declared in stdio.h that displays a single character at a time on the console.

13
New cards

gets()

An unformatted input function declared in stdio.h that reads a line of text, including space-separated strings, into a character array.

14
New cards

puts()

An unformatted output function declared in stdio.h that displays a group of characters or a string stored in a character array to the console.

15
New cards

Binary arithmetic operators

Arithmetic operators in C that act on two operands: addition (+), subtraction (-), multiplication (*), division (/), and modulus (%).

16
New cards

Modulus operator (%)

A binary arithmetic operator that calculates the remainder when the first operand is divided by the second operand.

17
New cards

Unary arithmetic operators

Arithmetic operators that work with a single operand: decrement (--), increment (++), unary plus (+), and unary minus (-).

18
New cards

Relational operators

Operators used to compare two values or operands, evaluating to a boolean value represented as 11 (true) or 00 (false).

19
New cards

Logical AND (&&)

A logical operator that evaluates to true (non-zero) only if both operands are true (non-zero); otherwise evaluates to false (00).

20
New cards

Logical OR (||)

A logical operator that evaluates to true (non-zero) if at least one operand is true, returning false (00) only if both operands are false.

21
New cards

Logical NOT (!)

A unary operator that reverses the logical truth value of its operand, changing true to false (00) and false to true (11).

22
New cards

Compound assignment operators

Operators combining an arithmetic or bitwise operation with assignment (such as +=, -=, *=, /=, %=) to compute and store results into the left operand.

23
New cards

Prefix increment (++variable)

An operation where the value of a variable is incremented by one before being evaluated in an expression.

24
New cards

Postfix increment (variable++)

An operation where the initial value of a variable is evaluated in an expression first, and then increased by one.

25
New cards

Bitwise operators

Operators in C used to perform operations directly on the individual bits of integer data types.

26
New cards

Bitwise XOR (^)

A bitwise operator that yields 11 if the corresponding bits of two operands are different and 00 if they are the same.

27
New cards

Bitwise NOT (~)

A unary operator that inverts each individual bit of its operand, transforming 00 to 11 and 11 to 00.

28
New cards

Left Shift operator (<<)

A bitwise operator that moves bits to the left by the specified number of positions, filling vacant places with 00s, equivalent to multiplying by powers of 22.

29
New cards

Right Shift operator (>>)

A bitwise operator that moves bits to the right by the specified number of positions, equivalent to dividing by powers of 22.

30
New cards

Conditional operator (?:)

A ternary operator taking three operands with syntax Variable = Expression1 ? Expression2 : Expression3, executing Expression2 if Expression1 is true and Expression3 if false.

31
New cards

sizeof operator

A unary special operator that returns the size in bytes of a variable or data type.

32
New cards

Address-of operator (&)

A unary special operator that returns the memory address of a variable.

33
New cards

Dereference operator (*)

A unary special operator used with a pointer to access the value stored at the memory address pointed to by that pointer.

34
New cards

Comma operator (,)

A binary operator that evaluates its left operand, discards the result, evaluates its right operand, and returns the right operand's value.

35
New cards

Type cast operator

A unary operator with syntax ((data_type) expression) used for explicit type conversion to temporarily change the data type of an expression.

36
New cards

Operator precedence

The rule dictating the order in which different operators within an expression are evaluated, prioritizing higher precedence operators over lower ones.

37
New cards

Operator associativity

The rule determining the direction of evaluation (left-to-right or right-to-left) when multiple operators with identical precedence appear in an expression.

38
New cards

Control structures

Programming constructs that determine program execution flow through decision-making (selection), repetition (iteration), and jumping.

39
New cards

if statement

A decision-making statement that executes a designated block of code only if a specified condition evaluates to true (non-zero).

40
New cards

if-else statement

A decision-making structure that executes one block of code if a condition is true, and an alternate block after the else keyword if the condition is false.

41
New cards

Nested if

An if statement placed inside another if or else statement's block to evaluate hierarchical conditions.

42
New cards

switch statement

A multi-way branch selection statement that evaluates an integer or character expression against multiple case constants to run matching code blocks.

43
New cards

Fall through

The situation in a switch statement where execution proceeds into subsequent case blocks because an intervening break statement was omitted.

44
New cards

break statement

A jump statement that immediately terminates the execution of the innermost loop or switch block and transfers control to the next sequential statement.

45
New cards

continue statement

A jump statement that skips the remaining statements in the current iteration of a loop and moves directly to the next iteration.

46
New cards

goto statement

A jump statement that unconditionally transfers program execution to a labeled statement within the same function.

47
New cards

for loop

An entry-controlled loop comprising initialization, test condition, and update expressions that executes repeatedly while the condition remains true.

<p>An entry-controlled loop comprising initialization, test condition, and update expressions that executes repeatedly while the condition remains true.</p>
48
New cards

while loop

An entry-controlled loop that evaluates a condition before each iteration and executes its body as long as the condition is true.

<p>An entry-controlled loop that evaluates a condition before each iteration and executes its body as long as the condition is true.</p>
49
New cards

do-while loop

An exit-controlled loop that executes its body first and checks the condition afterward, ensuring the loop body runs at least once.

<p>An exit-controlled loop that executes its body first and checks the condition afterward, ensuring the loop body runs at least once.</p>
50
New cards

Infinite loop

A loop structure where the test expression never becomes false, causing the loop's body to execute repeatedly without terminating.

51
New cards

Nested loops

The placement of one loop inside another loop body, where the inner loop executes its full cycle for every single iteration of the outer loop.