Skip to content

Collection of C language practice programs to improve problem-solving and coding skills. Includes various algorithms and data structures.

Notifications You must be signed in to change notification settings

Ishan1012/C-Practice-Programs

Repository files navigation

C Programming Practice Files

Welcome to my collection of C programming practice files. These files demonstrate various C programming concepts and techniques that I've learned throughout my coursework. Each file is a standalone program that focuses on a specific topic or problem.

Table of Contents

  1. Introduction
  2. Programs
  3. How to Compile and Run
  4. Learning Resources

Introduction

This repository contains practice C programs that I developed during my college coursework. The files cover a wide range of C programming topics such as:

  • Basic Syntax and Data Types
  • Control Flow (loops, conditionals)
  • Functions
  • Arrays and Pointers
  • Strings
  • File I/O
  • Dynamic Memory Allocation
  • Structures and Unions

Each file is well-documented with comments explaining the logic behind the code.

Programs

Below is a list of the key programs in this repository:

Filename Description
hello_world.c Basic program to print "Hello, World!"
calculator.c Simple calculator performing addition, subtraction, etc.
factorial.c Program to calculate the factorial of a given number
array_sort.c Sorting an array of integers using the bubble sort algorithm
pointer_demo.c Demonstrates the use of pointers in C
file_io.c Reading from and writing to a file
dynamic_memory.c Example of dynamic memory allocation with malloc()
struct_example.c Demonstrates the use of structures in C

Feel free to browse the individual files for more information on each program.

How to Compile and Run

You can compile and run any of these C programs using a C compiler such as gcc. Below are the steps to compile and execute a program:

  1. Compiling a Program: Open your terminal and navigate to the folder containing the C file you want to compile. Use the following command to compile:

    gcc filename.c -o output_name

    Example for hello_world.c:

    gcc hello_world.c -o hello_world
  2. Running the Program: After compilation, you can run the program using:

    ./output_name

    Example:

    ./hello_world

Learning Resources

Here are some additional resources that helped me in learning C programming:

Feel free to explore these resources to deepen your understanding of C.

Contributing

This repository is for educational purposes, but if you have suggestions or improvements, feel free to fork the repo and submit a pull request.


Thank you for visiting this repository! Happy coding! 🚀

About

Collection of C language practice programs to improve problem-solving and coding skills. Includes various algorithms and data structures.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published