A comprehensive collection of C programming exercises and projects covering fundamental concepts like arrays, patterns, calculations, and user input handling.
2D_Array_1.c- 2D array manipulation and sortingAssignment-3.c- Complex 2D array operations with pointers
Pattern_1.c- Star pattern trianglePattern_1a.c- Number pattern with odd numbersHalf_Diamond.c- Half diamond star patternfull_daimond.c- Complete diamond patternright_half_diamond.c- Right-aligned diamond pattern
arith operations.c- Basic arithmetic calculator (addition, subtraction, multiplication, division)calculator c.c- Interactive calculator programPrime_Factors.c- Prime factorization of numbersSum of Integers.c- Sum calculation for positive/negative integers
Age.c- Age-based classification (baby, child, adult)grading.c- Grade classification based on percentageheight.c- Height-based classification (short, average, tall, very tall)Human_Height.c- Statistical analysis of multiple height inputs
35_marker.c- Mathematical expression evaluation50_Marker.c- Number sequence operationsFunctions_1.c- Function demonstration programtest.c- Simple "Hello, World!" program
- GCC compiler installed on your system
- Basic understanding of C programming
# Make the script executable
chmod +x run_all.sh
# Run all programs
./run_all.sh# Compile a specific program
gcc filename.c -o output_name
# Run the compiled program
./output_name# Compile and run the calculator
gcc "arith operations.c" -o calculator
./calculator
# Compile and run pattern programs
gcc Pattern_1.c -o pattern
./pattern
# Compile and run age classifier
gcc Age.c -o age_classifier
./age_classifier- Cross-platform compatibility - All programs work on Linux, macOS, and Windows
- Clean code structure - Following C programming best practices
- Interactive programs - Several programs accept user input
- Educational value - Perfect for learning C programming fundamentals
| Category | Programs | Description |
|---|---|---|
| Patterns | Pattern_1.c, Pattern_1a.c, Half_Diamond.c, full_daimond.c, right_half_diamond.c |
Various star and number patterns |
| Arrays | 2D_Array_1.c, Assignment-3.c |
2D array operations and pointer manipulation |
| Math | arith operations.c, calculator c.c, Prime_Factors.c, Sum of Integers.c |
Mathematical calculations and algorithms |
| Classification | Age.c, grading.c, height.c, Human_Height.c |
User input classification systems |
| Utilities | 35_marker.c, 50_Marker.c, Functions_1.c, test.c |
Helper and demonstration programs |
Diamond Pattern:
*
***
*****
*******
*****
***
*
Number Pattern:
1
1 3
1 3 5
1 3 5 7
Please Enter Two Numbers: 10 5
Sum = 15.00
Difference = 5.00
Product = 50.00
Quotient = 2.00
PLEASE ENTER PERCENTAGE: 85
B+
- All programs compile without warnings
- Memory-safe operations
- Proper input validation where applicable
- Clean, readable code structure
- Standard C library usage only
Feel free to:
- Add new programs
- Improve existing code
- Fix bugs or issues
- Enhance documentation
This project is open source and available under the MIT License.
- Language: C (C99 standard)
- Compiler: GCC
- Platform: Cross-platform (Linux, Windows, macOS)
- Tools: Git for version control
- Total Programs: 19
- Lines of Code: ~500+
- Categories: 5
- All Programs: Tested and Working
*Happy Coding! *