CCpy is a repository offering a collection of pre-tested, working C programs designed for students.
This repository aids students in learning and understanding various C programming concepts, providing practical examples for assignments, projects, and exams.
Additionally, it showcases my C language learning and helps university students by offering code examples.
Navigating through the repository is straightforward, thanks to a clear hierarchical structure:
Level | Concept |
---|---|
1 | Files |
2 | Structs and Unions |
3 | Strings |
4 | Pointers |
5 | Arrays |
6 | Functions |
7 | Loops (while , do..while , for ) |
8.1 | Flow Control (switch , goto , ternary (:?) ) |
8.2 | Flow Control (Branching) (if , else , else if ) |
9 | Default (Anything Not Otherwise Mentioned) |
Each level has a dedicated directory. Related levels, such as 8.1 and 8.2, share a parent folder with subfolders.
To find a program involving functions, arrays, and loops:
- Arrays: Start with the arrays directory.
- Functions: Next, check the functions directory.
- Loops: Finally, explore the loops directory.
This path would look like: Arrays > Functions > Loops > program.c
To use the programs, ensure you have a C compiler like GCC installed. Follow these steps:
-
Clone the repository:
git clone https://github.com/sahil-shefeek/ccpy.git
-
Navigate to the repository's directory:
cd ccpy
-
Compile and run a program (e.g.,
program.c
):gcc program.c ./a.out
For Windows users:
gcc program.c a.exe
Each program is in a file with a descriptive name. To use a program:
- Open the file (e.g.,
program.c
) in a text editor.- Review the comments and code to understand its functionality.
- Modify as needed or use it as a reference for your projects.
- Save changes and follow the compilation instructions above.