Description: This repository contains a collection of basic C programs that I've created to practice and explore the capabilities of the C programming language. These programs demonstrate fundamental concepts like variables, data types, operators, control flow statements, functions, and more.
Programs:
- Here are the programs that are in the list and will be updated as I keep adding new programs
-
for-loop : This code demonstrates basic nested loops in C to calculate the sum of two variables (r and c) and display the results along with their corresponding values. It iterates through two nested loops, one for the row r (1 to 3) and another for the column c (1 to 2).
-
while_loop : The code implements a simple while loop in C that iterates from 1 to 9, printing each number to the console. The loop continues as long as the value of a is less than 10.
-
This is how you can utilize the code I've in my repository Getting Started
-
Clone the Repository: Use Git to clone this repository to your local machine. If you're unfamiliar with Git, you can download the ZIP file from GitHub.
-
Compile and Run:
- Open a terminal or command prompt and navigate to the repository directory.
- For each C program you want to run:
- Compile the program using a C compiler like GCC:
gcc <program_name>.c -o <executable_name>(Replace<program_name>and<executable_name>accordingly). - Run the executable:
./<executable_name>
- Compile the program using a C compiler like GCC:
Contributing
Feel free to fork this repository and contribute your own basic C programs! Here are some guidelines to keep things organized:
- Create new C files for your programs.
- Add your program name to the list above with a brief description.
- Follow consistent coding style and indentation for readability.
- Optionally, include comments within your code to explain its functionality.
License
This repository is licensed under the MIT License (see the LICENSE file for details). Feel free to use and modify the code for personal or educational purposes.