An open API service indexing awesome lists of open source software.

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

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! 🚀