Skip to content

This repository contains a collection of basic C++ code files covering various concepts and exercises. It includes simple programs and exercises aimed at beginners learning C++ programming.

Notifications You must be signed in to change notification settings

thesahirahmed/c_basics

Repository files navigation

🚀 Basic C++ Foundation

Welcome to this repo, your one-stop destination to build a strong foundation in C++ programming! 📚✨

🤔 Why this repository?

This repository is dedicated to helping beginners learn C++ programming basics in a concise and interactive manner. Each code file includes proper comments explaining every block of code, making it easier for learners to understand.

📝 How to Use

Understanding input.txt and output.txt

  • input.txt: Contains sample input for the programs.
  • output.txt: Contains the expected output corresponding to the input in input.txt.

Using tasks.json

  • tasks.json: Helps to automate taking input from input.txt and place the output in output.txt.

Running the Programs

  1. Clone this repository to your local machine.
  2. Navigate to the directory where you have cloned the repository.
  3. Open any C++ file using a text editor or an IDE.
  4. Compile and run the program using your preferred compiler or IDE.

📂 Contents

  • basic_i_o_code-1.cpp: Illustrates basic input/output operations, showcasing how to use cin and cout for reading and writing data.
  • namespace_code-2.cpp: Demonstrates the usage of namespaces, explaining how to avoid naming conflicts and organize code.
  • cout_cin_code-3.cpp: Example code demonstrating input and output using cin and cout in C++, including formatted input/output.
  • data_type_code-4.cpp: Example code demonstrating different data types in C++, such as int, float, double, char, and bool.
  • if_else_code-5.cpp: Example code demonstrating if-else statements and the use of the switch keyword in C++ for conditional logic.
  • array_code-6.cpp: Example code demonstrating array usage in C++, including initialization, accessing elements, and basic operations.
  • do_while_code-7.cpp: Example code demonstrating the do-while loop in C++.
  • string_code-8.cpp: Example code demonstrating string operations in C++, such as concatenation, comparison, and length calculation.
  • for_loop_code-9.cpp: Example code demonstrating the use of for loops in C++ for iterating over arrays and ranges.
  • pointers_code-10.cpp: Example code demonstrating the use of pointers in C++, including pointer arithmetic and memory addresses.
  • function_code-11.cpp: Example code demonstrating functions in C++.
  • ....

🤝 Contributing

Contributions are welcome! Feel free to contribute by adding more basic C++ programs, improving existing ones, or fixing issues.

🖋 Contributors

Sahir Ahmed

About

This repository contains a collection of basic C++ code files covering various concepts and exercises. It includes simple programs and exercises aimed at beginners learning C++ programming.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages