Lec-5 Flashcards
What are the basic arithmetic operators in C?
Addition (+), Subtraction (-), Multiplication (*), Division (/), Remainder (%)
What are the assignment operators in C?
Standard assignment (=), Compound assignment (+=, -=, *=, /=, %=)
What are the increment/decrement operators in C?
Post-increment (c++), Pre-increment (++c), Post-decrement (c–), Pre-decrement (–c)
What are the equality operators in C?
Equal to (==), Not equal to (!=)
What are the relational operators in C?
Greater than (>), Less than (<), Greater than or equal to (>=), Less than or equal to (<=)
What are the logical operators in C?
Logical AND (&&), Logical OR (||), Logical NOT (!)
What are the supported bitwise operators in C?
Bitwise AND (&), Bitwise OR (|), Bitwise XOR (^), Bitwise NOT (~), Left shift («), Right shift (»)
What is the operator precedence hierarchy in C?
- Parentheses ( )
- Unary Postfix (++, –)
- Unary Prefix (+, -, !, ++, –)
- Arithmetic Operators (*, /, %)
- Arithmetic Operators (+, -)
- Relational Operators (>, <, >=, <=)
- Equality Operators (==, !=)
- Logical AND (&&)
- Logical OR (||)
- Assignment Operators (=, +=, -=, etc.)
What is short-circuit evaluation in C?
Logical AND (&&): Stops evaluation if first condition is false
Logical OR (||): Stops evaluation if first condition is true
How is condition representation handled in C?
False is represented by zero (0), True is represented by any non-zero value
What are practical applications of bitwise operators?
Cryptography, Computer graphics, Hash functions, Compression algorithms, Network protocols
What are some recommended exercises for learning C operators?
- Division and remainder calculation
- Sum and average of numbers
- Bitwise operator manipulation
- Complex logical condition construction
What are some learning resources for C operators?
GeeksforGeeks: Assignment Operators, TutorialsPoint: Relational and Logical Operators, MIT OpenCourseWare: C Programming Fundamentals
What are the next steps in course progression after C operators?
Control Structures (Selection), Control Structures (Repetition), Built-in Functions, User-Defined Functions