Skip to content

The Repo Contains basic Structures of c programming for beginners which was created during the learning phase , Basic Structures Covered if any left feel open to contribute

Notifications You must be signed in to change notification settings

SohamDeshmukh1/C-Basics

Repository files navigation

C Basics

This repository contains basic programs written in the C programming language. It's intended as a learning resource for beginners who are just starting to learn C.

Programs Included

  1. Hello World: A simple program that prints "Hello, World!" to the console.
  2. Variables and Data Types: Programs demonstrating the declaration and use of variables, as well as different data types in C.
  3. Input and Output: Examples of taking input from the user and displaying output using printf() and scanf().
  4. Operators: Demonstrations of arithmetic, relational, logical, and bitwise operators in C.
  5. Control Structures: Examples of if-else statements, switch-case statements, and loops (for, while, do-while).
  6. Functions: Programs showcasing the creation and use of functions in C.
  7. Arrays: Examples of single-dimensional and multi-dimensional arrays, along with array manipulation.
  8. Pointers: Programs demonstrating the use of pointers in C, including pointer arithmetic and dynamic memory allocation.
  9. Strings: Examples of string manipulation, including string input/output, string concatenation, and string comparison.
  10. Structures: Demonstrations of creating and using structures in C.

Getting Started

To run these programs, you need a C compiler installed on your system. Below are the instructions for Windows (using Visual Studio Code) and Linux:

Prerequisites

For Windows (using Visual Studio Code)

  • Install Visual Studio Code (VS Code) from the official website.
  • Install the C/C++ extension for Visual Studio Code, which provides IntelliSense, debugging, and code browsing support for C/C++.

For Linux

  • Install GCC (GNU Compiler Collection) using your package manager. For example, on Ubuntu, you can install it with the command:
    sudo apt-get install gcc

Running the Programs

For Windows (using Visual Studio Code)

  1. Clone the repository:

    git clone https://github.com/GamerzUnite/C-Basics.git
  2. Open Visual Studio Code and navigate to the directory containing the program you want to run.

  3. Open the program file (e.g., hello_world.c) in Visual Studio Code.

  4. Press Ctrl + Shift + B to open the command palette and select the appropriate build task (e.g., C/C++: gcc.exe build active file).

  5. Once the program is built, you can run it by pressing F5 or selecting Run > Start Debugging from the menu.

For Linux

  1. Clone the repository:

    git clone https://github.com/GamerzUnite/C-Basics.git
  2. Navigate to the directory containing the program you want to run.

  3. Compile the program using GCC. For example, to compile hello_world.c:

    gcc hello_world.c -o hello_world
  4. Run the compiled executable:

    ./hello_world

Contributions

Feel free to contribute to this repository by adding more basic C programs or improving existing ones. Just fork the repository, make your changes, and submit a pull request.

License

This repository is licensed under the MIT License.

About

The Repo Contains basic Structures of c programming for beginners which was created during the learning phase , Basic Structures Covered if any left feel open to contribute

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages