Giter Club home page Giter Club logo

c-basics's Introduction

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.

c-basics's People

Contributors

sohamdeshmukh1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.