Skip to content

A comprehensive collection of C programs organized by category, showcasing various programming concepts from pattern printing to array applications. Ideal for beginners learning C programming and students looking for practical examples of algorithms and coding techniques.

Notifications You must be signed in to change notification settings

yammanhammad/C_Projects

Repository files navigation

C Programming Projects Collection

A comprehensive collection of C programs organized by category, showcasing various programming concepts from pattern printing to array applications. Ideal for beginners learning C programming and students looking for practical examples of algorithms and coding techniques.

Table of Contents

  1. Overview
  2. Project Categories
  3. Sample Outputs
  4. How to Compile and Run
  5. Project Structure
  6. Learning Path
  7. Contributing

Overview

This repository contains a collection of C programs demonstrating various programming concepts, patterns, and algorithms. Each program is documented with comments explaining the logic and implementation details. The programs are organized into categories based on their functionality and purpose.

Categories

Pattern Printing

Calculators

Number Triangles

Utility Programs

Array Applications

Sample Outputs

Pattern Printing Examples

Asterisk Diamond (Height: 5)

    *    
   ***   
  *****  
 ******* 
*********
 ******* 
  *****  
   ***   
    *    

X Pattern (Height: 5)

*       *
 *     * 
  *   *  
   * *   
    *    
   * *   
  *   *  
 *     * 
*       *

Calculator Example (Basic Calculator)

BASIC CALCULATOR
---------------
1. Addition
2. Subtraction
3. Multiplication
4. Division
---------------
Enter choice (1-4): 1
Enter first number: 15
Enter second number: 27
Result: 15 + 27 = 42

Number Triangle Example (Ascending Triangle)

1
2 3
4 5 6
7 8 9 10

Utility Program Example (Separator)

Enter a number: 12345
Digits: 1 2 3 4 5
Sum of digits: 15

How to Compile and Run

These programs can be compiled using any standard C compiler (GCC recommended):

# For a program in a subfolder
gcc -o program_name Category_Folder/program_name.c
./program_name

Examples:

To compile and run the asterisk diamond pattern:

gcc -o diamond Pattern_Printing/asterisk_diamond.c
./diamond

To compile a program that uses the math library:

gcc -o calculator Calculators/scientific_calculator.c -lm
./calculator

Project Structure

C_Projects/
├── Pattern_Printing/
│   ├── asterisk_diamond.c
│   ├── centered_asterisk_pyramid.c
│   ├── x_pattern.c
│   ├── border_pattern.c
│   ├── cross_square_pattern.c
│   └── patterns.c
├── Calculators/
│   ├── basic_calculator.c
│   ├── scientific_calculator.c
│   └── factorial_calculator.c
├── Number_Triangles/
│   ├── ascending_triangle.c
│   ├── column_counter_triangle.c
│   ├── increasing_odd_rows.c
│   ├── odd_number_triangle.c
│   ├── combined_patterns.c
│   ├── numeric_pyramid.c
│   └── alternating_triangle.c
├── Utility_Programs/
│   ├── character_counter.c
│   ├── height_category.c
│   ├── separator.c
│   └── multiplication_table.c
├── Array_Applications/
│   ├── fruit_stock.c
│   ├── order_tracker.c
│   └── matrix_pointer_sort.c
├── .gitignore
└── README.md

Learning Path

If you're new to C programming, consider following this progression:

  1. Start with basic pattern printing programs to understand control structures
  2. Move to number triangles to practice more complex looping logic
  3. Try the utility programs to learn input/output and basic algorithms
  4. Explore calculators to understand functions and mathematical operations
  5. Finally, tackle array applications for more advanced concepts

Contributing

Feel free to contribute by adding more programs or improving existing ones. Please maintain the folder structure when adding new files.

  1. Fork the repository
  2. Create a new branch for your feature
  3. Add or modify programs
  4. Submit a pull request

Please ensure your code is well-commented and follows the existing style.

About

A comprehensive collection of C programs organized by category, showcasing various programming concepts from pattern printing to array applications. Ideal for beginners learning C programming and students looking for practical examples of algorithms and coding techniques.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages