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

https://github.com/akashjitu18/c-programs

This repository contains a collection of C programming examples, which I had practiced while learning C.
https://github.com/akashjitu18/c-programs

c practice-programming programs

Last synced: 9 months ago
JSON representation

This repository contains a collection of C programming examples, which I had practiced while learning C.

Awesome Lists containing this project

README

          

C Programming Examples

This repository contains a collection of C programming examples, which I had practiced while learning C. These programs are organized by topic. Each example demonstrates a specific concept or technique in C programming, and is intended to help learners understand and practice C programming.

Topics Covered
1. Variables, Constants, Keywords, Instructions, and Operations :
Examples of declaring and using variables, constants, and keywords in C
Demonstrations of basic arithmetic, comparison, logical, and assignment operations
2. Conditional Statements :
Examples of using if-else statements, switch statements, and conditional operators
Demonstrations of how to use conditional statements to control program flow
3. Loop Control Statements :
Examples of using for loops, while loops, and do-while loops
Demonstrations of how to use loop control statements to repeat tasks
4. Functions and Recursions :
Examples of defining and using functions in C
Demonstrations of how to use functions to organize code and reduce repetition
Examples of recursive functions and how they can be used to solve problems
5. Pointers :
Examples of using pointers to manipulate memory and variables
Demonstrations of how to use pointers to dynamically allocate memory and pass arguments to functions
6. Arrays :
Examples of declaring and using one-dimensional and multi-dimensional arrays
Demonstrations of how to use arrays to store and manipulate data
7. Strings :
Examples of using strings in C, including string literals and string functions
Demonstrations of how to use strings to manipulate and display text
8. Structures :
Examples of defining and using structures in C
Demonstrations of how to use structures to organize and manipulate data
9. File I/O Operations :
Examples of reading and writing files in C
Demonstrations of how to use file I/O operations to persist data and interact with the file system
10. Dynamic Memory Allocation :
Examples of using malloc, calloc, and realloc to dynamically allocate memory
Demonstrations of how to use dynamic memory allocation to manage memory and avoid memory leaks
11. Small Games using C :
Examples of simple games implemented in C, such as Number Guessing Game: A game where the user has to guess a randomly generated number
Example code: number_guessing_game.c
Rock Paper Scissors Game : A game where the user can play against the computer
Example code: rock_paper_scissors_game.c

How to Use This Repository

Browse through the folders to find examples related to a specific topic.
Each example is a standalone C program, and can be compiled and run independently.
To compile and run an example, simply open a terminal, navigate to the folder containing the example, and type gcc example.c -o example (replace example.c with the name of the file).
You can modify the examples to experiment with different scenarios and learn more about C programming.

License :
This code is free to use, modify, and distribute for personal and commercial purposes

Contact :
If you have any questions or feedback, feel free to contact me at akashjitu18@gmail.com.