C++ is an extension of the C programming language. It was developed in the early 1980s by Bjarne Stroustrup at Bell Labs as an enhancement to C, with the addition of object-oriented and generic programming features. C++ is considered a "mid-level" language, as it provides a balance between the high-level abstraction of a high-level language and the low-level control of a low-level language.
Some of the key features of C++ include:
Object-oriented programming (OOP) features, such as classes, objects, inheritance, and polymorphism
Templates for generic programming
Support for low-level operations similar to C
Standard Template Library (STL) that provides a wide range of useful container classes and algorithms
Exception handling
Support for multiple programming paradigms, including imperative, functional, and object-oriented programming
A large and active community that provides a wealth of resources and libraries for developers to use.
C++ is widely used for developing various types of applications, such as video games, financial software, operating systems, and device drivers. It is also commonly used in the field of computer graphics, as well as in the development of high-performance numerical and scientific simulations.
Basics
- Setting up C++
- Development Environment
- Writing first C++ program(Practice)
- void main or main()
- C++ Data Types(Practice)
- Basic Input/Output
- Response on exceeding valid range of data types
- C++ Preprocessors
- Operators in C++(Practice)
- Loops (Practice)
- Decision Making in C++(Practice)
- Execute both if and else simultaneously
- How to compile 32-bit program on 64-bit gcc in C and C++
- Switch statement in C++(Practice)
- Functions in C++(Practice)
- Arrays in C/C++(Practice)
- Strings in C++(Practice)
- Pointers in C++(Practice)
- References in C++
- Introduction to OOP in C++
C vs C++
- C program that won’t compile in C++
- Undefined Behaviour in C and C++
- Name Mangling and extern “C” in C++
- void * in C vs C++
- Program that produces different results
- in C and C++
- Type difference of character literals in C vs C++
- Difference between Structures in C and C++
C++ vs Java
- Inheritance in C++ vs Java
- static keyword in C++ vs Java
- default virtual behavior in C++ vs Java
- Exception Handling in C++ vs Java
- Foreach in C++ vs Java
- Templates in C++ vs Generics in Java
- Floating Point Operations & Associativity in C, C++ and Java
- Similarities between Java and C++
Input and output
- I/O Redirection in C++
- Clearing The Input Buffer
- Basic Input/Output(Practice)
- cout << endl vs cout << “\n” in C++
- Problem with scanf() when there is fgets()/gets()/scanf() after it
- How to use getline() in C++ when there are blank lines in input?
- scanf() and fscanf() in C – Simple Yet Poweful
- Using return value of cin to take unknown number of inputs in C++
- How to change the output of printf() in main() ?
- Implementation of a Falling Matrix
- What does buffer flush means in C++ ?
- kbhit in C language
- Code to generate the map of India
Operators
- Operators in C++
- Unary operators in C/C++
- Conditionally assign a value without
- using conditional and arithmetic operators
- Execution of printf with ++ operators
- Set a variable without using
- Arithmetic, Relational or Conditional Operator
- Scope Resolution Operator vs this pointer
- Pre-increment (or pre-decrement)
- new and delete operator in C++
- CHAR_BIT in C
- Casting operators| Set 1 (const_cast)
Arrays and Strings
- Arrays in C/C++
- Array of Strings
- Multidimensional arrays in C/C++
- Raw string literal
- Counts of distinct consecutive sub-string
- of length two
- Converting string to number and vice-versa
- Find size of array in C/C++ without using sizeof
- How to quickly reverse a string in C++?
- Tokenizing a string in C++
- Getline() function and character array
- Convert string to char array in C++
- C++ string class and its applications , Set 2
- How to create a dynamic 2D array inside a class in C++ ?
- Lexicographically next permutation
- Print size of array parameter
- Split a string in C/C++, Python and Java
- Stringstream in C++ and its applications
- Strchr() function in C/C++
- Isspace() in C/C++ and its application to count whitespace characters
- Char* vs std:string vs char[] in C++
- Std::lexicographical_compare() in C++STL
- Std::string::at in C++
- Std::substr() in C/C++
- std::stol() and std::stoll() functions in C++
- Extract all integers from string in C++
- Strchr() function in C++ and its applications
- Strcat() vs strncat() in C++
- Strncat() function in C/C++
- Strpbrk() in C
- strcoll() in C/C++
- Why strcpy and strncpy are not safe to use?
Functions
- Functions in C++
- Default Arguments
- C function argument and return values
- Inline Functions
- Return from void functions
- Returning multiple values from a function
- using Tuple and Pair
- Function Call Puzzle
- Functors
- Ciel and floor functions in C++
- Const member functions
- atol(), atoll() and atof() functions in C/C++
- swap() in C++
- wmemmove() function in c++
- wcscat() function in C++
- wcscmp() function in C++ with Examples
- wcscpy() function in C++ with Examples
- wcslen() function in C++ with Examples
- difftime() function in C++
- asctime() function in C++
- localtime() function in C++
- scalbn() function in C++
- isunordered() function in C++
- isnormal() in C++
- isinf() function in C++
- quick_exit() function in C++ with Examples
- ctime() Function in C/C++
- clock() function in C/C++
- nearbyint() function in C++
- quick_exit() function in C++ with Examples
- wcscmp() function in C++ with Examples
- wcscpy() function in C++ with Examples
- wcslen() function in C++ with Examples
Pointers and References
- Pointers in C and C++
- What is Array Decay in C++? How can
- it be prevented?
- Opaque Pointer
- References
- Can references refer to invalid location?
- Pass arguments by reference or pointer
- Smart Pointers
- ‘this’ pointer
- Type of ‘this’ pointer
- “delete this”
- auto_ptr, unique_ptr, shared_ptr and weak_ptr
- Dangling, Void , Null and Wild Pointers
- Passing by pointer Vs Passing by Reference
- NaN in C++ – What is it and how to check for it?
- nullptr
- Pointers vs References in C++
Dynamic memory allocation
- new and delete operator in C++
- malloc() vs new
- delete() and free()
- Std::get_temporary_buffer in C++
Object Oriented Programming(OOP)
- Object-oriented design
- Introduction to OOP in C++
- Classes and Objects
- Access Modifiers
- Inheritance
- Polymorphism
- Encapsulation
- Data Abstraction
- Structure vs class
- Can a C++ class have an object of self type?
- Why is the size of an empty class not zero?
- Static data members in C++
- Some interesting facts about static member functions
- Friend class and function
- Local Class
- Nested Classes
- Simulating final class
Constructor and Destructor
- Constructors
- Copy Constructor
- Destructors
- Does compiler create default constructor
- when we write our own?
- When should we write our
- own copy constructor?
- When is copy constructor called?
- Initialization of data members
- Use of explicit keyword
- When do we use Initializer List in?
- Default Constructors
- Private Destructor
- Playing with Destructors
- Copy elision
- C++ default constructor | Built-in types
- When does compiler create a
- default constructor and copy constructor?
- Why copy constructor argument should be
- const in C++?
- Advanced C++ | Virtual Constructor
- Advanced C++ | Virtual Copy Constructor
- When are static objects destroyed?
- Is it possible to call constructor
- and destructor explicitly?
Function Overloading
- Function Overloading
- Functions that can’t be overloaded
- Function overloading and const keyword
- Function overloading and return type
- Does overloading work with Inheritance?
- Can main() be overloaded
- Function Overloading and float
Operator Overloading
- Operator Overloading
- Copy constructor vs assignment operator
- When should we write our
- own assignment operator?
- Operators that cannot be overloaded
- Conversion Operators
- Is assignment operator inherited?
- Default Assignment Operator and References
- Overloading stream insertion (<<)
- and extraction (>>) operators
- Overloading array index operator []
Virtual Functions
- Virtual Functions and Runtime Polymorphism
- Default arguments and virtual function
- Virtual functions in derived classes
- Can static functions be virtual?
- Virtual Destructor
- Virtual Constructor
- Virtual Copy Constructor
- RTTI (Run-time type information)
- Can virtual functions be private?
- Inline virtual function
- Pure Virtual Functions and Abstract Classes
- Pure virtual destructor
Exception Handling
- Exception Handling Basics
- Stack Unwinding
- Catching base and derived classes as exceptions
- Catch block and type conversion
- Exception handling and object destruction
Namespace
- Namespace in C++ | Set 1 (Introduction)
- Set 2 (Extending namespace and
- Unnamed namespace)
- Namespace in C++ | Set 3 (Accessing,
- creating header, nesting and aliasing)
- Inline namespaces and usage of the
- “using” directive inside namespaces
- Can namespaces be nested?
