This is my personal playground for C++ code snippets. It is not meant to be a complete project, but rather a collection of small examples and experiments to enhance my knowledge of c++ programming language.
Note: Notes on C++ programming language are available in the Resources folder.
. ├── 100_The_Foundation/ │ ├── 110_Basic_IO_and_Syntax/ │ ├── 120_Control_Flow_and_Logic/ │ └── 130_Functions_and_Basic_Data_Aggregates/ ├── 200_The_Core_Toolkit/ │ ├── 210_Pointers_Memory_and_Linear_Structures/ │ ├── 220_Abstract_Data_Types/ │ ├── 230_Foundational_Algorithms/ │ ├── 240_Non-Linear_Structures_Trees/ │ └── 250_Hashing_and_Graph_Structures/ ├── 300_Modern_CPP_and_Design/ │ ├── 310_Resource_Management_and_RAII/ │ ├── 320_Object_Oriented_Programming_OOP/ │ ├── 330_Generic_Programming_with_Templates/ │ └── 340_Exploring_the_STL_and_Advanced_Features/ ├── 400_Systems_Programming/ │ ├── 410_Low_Level_File_IO_and_Serialization/ │ ├── 420_Concurrency_and_Multithreading/ │ ├── 430_Networking_and_Protocols/ │ ├── 440_Inter_Process_Communication_IPC/ │ └── 450_Introduction_to_Embedded_Systems/ ├── 500_Domain_Specializations/ │ ├── 510_Computer_Graphics/ │ ├── 520_Audio_Programming/ │ ├── 530_Cryptography/ │ └── 540_High_Performance_Computing_HPC/ ├── 600_Grand_Challenges/ │ ├── 610_Building_a_Game_Engine/ │ ├── 620_Building_a_Database_Management_System/ │ ├── 630_Building_a_Compiler/ │ └── 640_Building_an_Operating_System_Kernel/ └── Resources/ ├── Code_Snippets/ ├── External_Articles_and_Docs/ └── Language_Notes/
Contents is organized on the basis of deepest level of the folder structure.
- Hello World - A simple program that prints "Hello, World!" to the console.
- Predefined Message - A program that prints a predefined message to the console.
- Input and Output - A program that takes user input and prints it to the console.
- Sum of Two Numbers - A program that takes two numbers as input and prints their sum.
- Temperature Conversion - A program that converts temperature between Celsius and Fahrenheit.
- Length Conversion - A program that converts lengths between Meters and Feet.
- Rectangle Area/Perimeter Calculator - A program that takes user input and outputs area and perimeter of rectangle.
- Floating Point Multiplier - Prompt the user for two floating point numbers and display product.
- Size of Data Types - Print the size in bytes of char, short, int, long, long long, float, double, and bool.
- Limits of Data Types - Print the limits of char, short, int, long, long long, float, double, and bool.
- ASCII - Print the ASCII value of a character.
- Simple Interest Calculator - Calculate simple interest given principal, rate, and time.
- Integer Overflow Demo - Demonstrates integer overflow in C++.
- Mixed Arithmetic Display - Perform and display results of arithmetic operations between integer and double.
- Swap Numbers - Swap two variables using temp variable
- Even/Odd Checker - Determine if number is even or odd
- Find Largest - Find largest of three numbers
- Vowel/Consonant - Check if character is vowel or consonant
- Leap Year - Check if year is leap year
- Basic Login - Username/password verification
- Number Guessing Game - Guess random number with hints
- Print 1 to N - Loop to print numbers 1 to N
- Multiplication Table - Generate multiplication table
- Factorial - Calculate factorial of number
- Prime Checker - Check if number is prime
- Palindrome Number - Check if number reads same forwards/backwards
- Fibonacci Generator - Generate Fibonacci sequence
- Calculator - Basic calculator using switch-case
- Rock Paper Scissors - Game against computer
- CGPA Calculator - Calculate grade point average
- Half Pyramid - Print star pattern in triangle shape
- Full Pyramid - Print full pyramid star pattern
- Armstrong Number - Check if number equals sum of digit powers
- Sum Natural Numbers - Sum numbers 1 to N
- Count Digits - Count digits in integer
- Function (Pass-by-Value) - Demonstrate function scope
- Prime Function - Encapsulate prime checking in function
- Array Average - Calculate average of array elements
- Array Min/Max - Find smallest and largest in array
- Linear Search - Search for element in array
- Reverse Array - Reverse array elements in-place
- Count Duplicates - Count duplicate elements in array
- String to Uppercase - Convert C-string to uppercase
- String Trimmer - Truncate string to N characters
- Word Counter - Count words in C-string
- String Palindrome - Check if string is palindrome
- To-Do List - Manage tasks with array of strings
- Student Report Card - Use parallel arrays for student data
- Contact Book - Store names and phone numbers
- Bubble Sort - Sort array using bubble sort