C Programming – Day 2 | Operators & Expressions Explained (Interactive Guide)
OPERATORS AND EXPRESSIONS (INTERACTIVE)
✅ I’m marking Day-1 Completed 🎉
Now we move to:
📍 Day-2 — Operators & Expressions (Interactive)
1️⃣ Arithmetic Operators
2️⃣ Relational Operators
3️⃣ Logical Operators
4️⃣ Increment & Decrement
5️⃣ Mini Project + QuizAfter today’s tasks → I will start compiling everything.
✅ 1. Arithmetic Operators
| Operator | Meaning | Example |
|---|---|---|
| + | Addition | a + b |
| - | Subtraction | a - b |
| * | Multiplication | a * b |
| / | Division | a / b |
| % | Modulus (Remainder) | a % b |
Example:
✅ 2. Relational Operators
Used for comparison, result is True(1) or False(0)
| Operator | Meaning |
|---|---|
| > | Greater than |
| < | Less than |
| >= | Greater or equal |
| <= | Less or equal |
| == | Equal |
| != | Not equal |
Example:
✅ 3. Logical Operators
| Operator | Meaning | Example |
|---|---|---|
| && | AND | True if both true |
| || | OR | True if any true |
| ! | NOT | Reverse result |
Example:
✅ 4. Increment / Decrement
| Symbol | Meaning |
|---|---|
| ++ | Increase by 1 |
| -- | Decrease by 1 |
Example:
🧪 Practice Example (Calculate Total Marks)
✅ Task-2 (You Must Solve)
Write a program to:
✔ Input 3 subject marks
✔ Calculate Total and Average
✔ Print the result
Example Output:
📌 Hint: Use → total = m1 + m2 + m3;
📌 Use float for average
Send me your code — I will review ✅
📝 Quick Quiz (Day-2)
Reply like: 1A, 2C, 3B
1️⃣ Which operator gives remainder?
A) %
B) /
C) *
2️⃣ Which operator checks equality?
A) !=
B) >
C) ==
3️⃣ Which gives "AND" logic?
A) ||
B) &&
C) !
When you send:
✔ Task-2 Code
✔ Quiz Answers
➡ I will mark Day-2 Completed
➡ Then move to Day-3: if-else Conditions
I’m waiting for your Task-2 solution! 🚀

No comments
Thank You For Visit My Website.
I Will Contact As Soon As Possible.