C Programming Practice Test: Data Types, Operators and Expressions — Flashcards | C Programming | FatSkills

C Programming Practice Test: Data Types, Operators and Expressions — Flashcards

Fast review mode: answers are shown by default so you can skim quickly. Hide them if you want to self-test.

Quiz questions on: Variable names, datatypes, constants, declarations, arithmetic operators, relational and logical operators, type conversions, bitwise operators, assignment operators, increment and decrement operators, conditional expressions, evaluation order and precedence.

Data Types
C has four basic data types:

Char: This data type stores a single character. It can be signed or unsigned.
Int: This data type stores an integer. It can be signed or unsigned.
Float: This data type stores a floating-point number.
Double: This data type stores a double-precision floating-point number.

Operators
C has a variety of operators, including:
Arithmetic operators:
These operators are used to perform arithmetic operations, such as addition, subtraction, multiplication, and division.
Relational operators: These operators are used to compare two values, such as equal to, not equal to, greater than, and less than.
Logical operators: These operators are used to combine two logical expressions, such as and, or, and not.
Bitwise operators: These operators are used to manipulate bits, such as and, or, and xor.
Assignment operators: These operators are used to assign a value to a variable.

Expressions
An expression is a combination of operators and operands. Operands can be variables, constants, or other expressions. Expressions are evaluated to produce a value.
 

1 of 211 Ready
Which is valid C expression?
int my_num = 100000;
Shortcuts
Prev Space Show / hide Next
Turn this into a study set.
Sign in with Google to save tricky questions to your reminder list and resume on any device.
Sign in with Google Free • no extra password