Please find recent Articles on C/C++ here !!
C vs C++, C++ vs Java, Basics, Operators, Arrays and Strings, References and Pointers, Functions, Namespaces, Function Overloading, Operator Overloading, Virtual Functions, Exception Handling, Class and Object, Constructor and Destructor, Puzzles, Inheritance, Standard Template Library (STL), Special Members , Inheritance , C++ Library, C++ Advanced, Input and Output, C++ in Competitive Programming, Output Questions, Quizzes on C++
- C program that won’t compile in 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++
- 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
- Floating Point Operations
& Associativity in C, C++ and Java
- 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)
- Array of Strings
- 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++?
- 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
- Pointers in C and C++
- What is Array Decay in C++? How can
it be prevented?
- Opaque Pointer
- 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?
- Inline Functions
- Return from void functions
- Returning multiple values from a function
using Tuple and Pair
- Function Call Puzzle
- Namespace in C++ | Set 1 (Introduction)
- Set 2 (Extending namespace and
- 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?
- 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
- 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 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 Basics
- Stack Unwinding
- Catching base and derived classes as exceptions
- Catch block and type conversion
- Exception handling and object destruction
- Introduction to Object Oriented Programming
- Structure vs class
- Can a C++ class have an object of self type?
- Why is the size of an empty class not zero?
- Copy Constructor
- 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
- 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
- Default Constructors
- When are static objects destroyed?
- Is it possible to call constructor
and destructor explicitly?
- Can we call an undeclared function in?
- Can we access global variable if there
is a local variable with same name?
- Can we use function on left side
of an expression in C and C++?
- Can we access private data members
of a class without using a member
or a friend function?
- How to make a C++ class whose objects
can only be dynamically allocated?
- How to print “GeeksforGeeks” with
- Print 1 to 100, without loop and recursion
- How to restrict dynamic allocation of objects
- Sum of digits of a number in single statement
- Write a URL in a C++ program
- Zoom digits of an integer
- Printing pyramid pattern
- How to swap two variables in one line in C/C++, Python and Java?
- Priority Queue
- Heap using STL C++
- sort() in C++ STL
- Type Inference in C++ (auto and decltype)
- transform() in C++ STL
- Variadic function templates in C++
- Template Specialization
- Default Arguments
- malloc() vs new
- delete() and free()
- Some interesting facts about static member functions
- Static data members in
- Friend class and function
- Inheritance and friendship
- Use of explicit keyword
- Local Class
- Nested Classes
- Casting operators| Set 1 (const_cast)
- Simulating final class
- Const member functions
- What all is inherited from parent class in C++?
- Virtual Functions and Runtime Polymorphism in C++
- Multiple Inheritance in C++
- What happens when more restrictive access is given to a derived class method in C++?
- Object Slicing in C++
- Hiding of all overloaded methods in base class
- <random> file – generators and distributions
- Array type manipulation
- C program to demonstrate fork() and pipe()
- Complex numbers in C++ | Set 1 Set 2
- Inbuilt library functions for user Input
- valarray class
- Floating Point Manipulation (fmod(), remainder(), remquo() … in cmath)
- Character Classification: cctype
- Socket Programming
- Precision of floating point numbers in C++ (floor(), ceil(), trunc(), round() and setprecision())
- <bit/stdc++.h> header file
- std::string class in C++
- Merge operations using STL in C++ (merge, includes, set_union, set_intersection, set_difference, ..)
- std::partition in C++ STL
- Ratio Manipulations in C++ | Set 1 (Arithmetic) , Set 2 (Comparison)
- numeric header in C++ STL | Set 1 (accumulate() and partial_sum()), Set 2 (adjacent_difference(), inner_product() and iota())
- Bind function and placeholders
- Array class
- Regex (Regular Expression)
- Common Subtleties in Vector STLs
- Understanding constexpr specifier
- unordered_multiset and its uses
- unordered_multimap and its application
- Populating a vector in C++ using fill() and fill_n()
- Writing OS Independent Code in C/C++
- Database Connectivity using C/C++
- C++ bitset and its application
- unordered_map in STL and its applications
- unorderd_set in STL and its applications
- nextafter() and nexttoward()
- User Defined Literal
- Placement new operator
- Advanced C++ with boost library
- Copy-and-Swap Idiom
- Zombie and Orphan Processes
- Lambda expression
- Clearing The Input Buffer
- 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
- How to change the output of printf() in main() ?
- Implementation of a Falling Matrix
- Code to generate the map of India
- Writing C/C++ code efficiently in Competitive programming
- Useful Array algorithms in C++ STL
- Data Type Ranges and their macros
- Cin-Cout vs Scanf-Printf
- getchar_unlocked() – faster input in C/C++ for Competitive Programming
- C qsort() vs C++ sort()
- Generating Test Cases (generate() and generate_n()
- Set 1
- Set 2
- Set 3
- Set 4
- Set 5
- Set 6
- Set 7
- Set 8
- Set 9
- Set 10
- Set 11
- Set 12
- Set 13
- Set 14
- Set 15
- Set 16
- Set 17
- Set 18
- Commonly Asked C++ Interview Questions | Set 1
- Commonly Asked OOP Interview Questions | Set 1
- C/C++ Programs