https://github.com/fatima-progmmer/logical-operator-in-c-
https://github.com/fatima-progmmer/logical-operator-in-c-
cplus cpp logical opeartor
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fatima-progmmer/logical-operator-in-c-
- Owner: Fatima-progmmer
- Created: 2024-09-18T09:47:26.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-03-08T03:04:15.000Z (about 2 months ago)
- Last Synced: 2025-03-08T04:17:51.337Z (about 2 months ago)
- Topics: cplus, cpp, logical, opeartor
- Language: C++
- Homepage:
- Size: 980 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🔢 Logical Operators in C
This project demonstrates the usage of **Logical Operators in C**, which are essential for decision-making and conditional statements in programming.
## 🌟 Overview
Logical operators are used to perform logical operations in C. These operators return either **true (1)** or **false (0)** based on the given conditions.## 🛠️ Logical Operators in C
| Operator | Description | Example |
|----------|------------|---------|
| `&&` (AND) | Returns true if both conditions are true | `(a > 5 && b < 10)` |
| `||` (OR) | Returns true if at least one condition is true | `(a > 5 || b < 10)` |
| `!` (NOT) | Reverses the logical state of a condition | `!(a > 5)` |## 🚀 How to Run
1. Clone the repository:
```bash
git clone https://github.com/Fatima-progmmer/Logical-operator-in-c-.git
```
2. Open the C file (`logical_operators.c`) in a C compiler.
3. Compile and run the program:
```bash
gcc logical_operators.c -o logical_operators
./logical_operators
```## 💡 Future Enhancements
🔹 Add more examples for nested conditions
🔹 Include interactive user input for better understanding
🔹 Create a menu-driven program for logical operations## 📌 Contribution
Feel free to contribute by adding more use cases or improving the explanations!## 📬 Connect with Me
👩💻 **Tanzeela Fatima**
🔗 [LinkedIn](https://www.linkedin.com/in/tanzeela-fatima-47861b2b7/) | 🐙 [GitHub](https://github.com/Fatima-progmmer)Give this project a ⭐ if you find it helpful! 🚀