Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Sign In
▲
Similar Topics
C++
4.2k+ articles
C++ Programs
2.4k+ articles
STL
1.2k+ articles
CPP Examples
700+ articles
CPP-Functions
600+ articles
CPP-Basics
90+ articles
CPP-DSA
89 articles
cpp-data-types
57 articles
cpp-multithreading
33 articles
C++ File Programs
22 articles
misc-cpp
35 posts
Popular Articles
Recent Articles
How to Swap Two Numbers Using Pointers in C++?
Last Updated: 28 May 2024
Swapping the values of two numbers is a very common operation in programming, which is often used to understand the basics of variables, poi
...read more
CPP-Basics
C++
C++ Programs
Picked
CPP Examples
misc-cpp
Function Pointer to Member Function in C++
Last Updated: 28 May 2024
In C++, function pointers enable users to treat functions as objects. They provide a way to pass functions as arguments to other functions.
...read more
C++
Misc C++
C++ Programs
Picked
CPP-OOPs
CPP Examples
misc-cpp
Difference Between .cc and .cpp File Extensions in C++
Last Updated: 29 May 2024
In C++, we use different file extensions to store our code. Two of the most common extensions are .cc and .cpp both store C++ codes. Althoug
...read more
C++
C++ Programs
Picked
C++ File Programs
CPP Examples
misc-cpp
Similar Topics
C++
4.2k+ articles
C++ Programs
2.4k+ articles
STL
1.2k+ articles
CPP Examples
700+ articles
CPP-Functions
600+ articles
CPP-Basics
90+ articles
CPP-DSA
89+ articles
cpp-data-types
57+ articles
cpp-multithreading
33+ articles
C++ File Programs
22+ articles
unique_lock or lock_guard: Which Is Better?
Last Updated: 08 May 2025
In C++, to manage access to shared resources, the STL (standard template library) of C++, provides synchronization mechanisms such as lock_g
...read more
C++
C++ Programs
cpp-multithreading
Picked
CPP Examples
misc-cpp
How to Create a Dictionary in C++?
Last Updated: 15 October 2024
A dictionary is a data structure in python that enables users to store data in the form of key-value pairs, where each key must be unique. I
...read more
STL
C++
C++ Programs
cpp-map
Picked
CPP Examples
misc-cpp
How to Get Time in Milliseconds in C++?
Last Updated: 28 May 2024
In programming measuring accurate time is a common requirement for most software development packages. In C++, we have the std::chrono libra
...read more
CPP-Library
C++
C++ Programs
Picked
CPP Examples
misc-cpp
How to Seed a Random Number Generator in C++?
Last Updated: 28 May 2024
In C++, seeding a random number generator is important for generating different sequences of random numbers on each program run. This proces
...read more
CPP-Functions
C++
C++ Programs
Picked
cpp-random
misc-cpp
How to Use HashMap in C++?
Last Updated: 28 May 2024
A HashMap is a data structure in which the elements are stored in key-value pairs such that every key is mapped to a value using a hash func
...read more
STL
C++
C++ Programs
cpp-unordered_map
Picked
CPP Examples
misc-cpp
How Can I Get a File Size in C++?
Last Updated: 28 May 2024
In C++, we often need to determine the size of a file which is the number of bytes in a file. This is done for various applications, such as
...read more
cpp-file-handling
C++
C++ Programs
Picked
C++ File Programs
CPP Examples
misc-cpp
Stack implementation in C++
Last Updated: 27 May 2024
Stack is the fundamental data structures used in the computer science to the store collections of the objects. It can operates on the Last I
...read more
C++
Picked
CPP-DSA
misc-cpp
One Dimensional Arrays in C++
Last Updated: 27 May 2024
One-dimensional arrays are like a row of boxes where you can store things where each box can hold one item, such as a number or a word. For
...read more
C++
Picked
CPP-DSA
misc-cpp
Operator Precedence and Associativity in C++
Last Updated: 24 May 2024
In C++,operator precedence and associativity are important concepts that determine the order in which operators are evaluated in an expressi
...read more
cpp-operator
C++
Picked
misc-cpp
C++ Program for DFS Traversal
Last Updated: 26 May 2024
In C++ Depth-First Search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root
...read more
C++
Picked
CPP-DSA
misc-cpp
C++ Program to Implement Stack using array
Last Updated: 24 May 2024
Stack is the fundamental data structure that can operates the under the Last In, First Out (LIFO) principle. This means that the last elemen
...read more
C++
Picked
CPP-DSA
misc-cpp
How to Use cin.fail() Method in C++?
Last Updated: 28 May 2024
In C++, thecin.fail()method is a part of iostreamlibrary that is used to check whether the previous input operation has succeeded or not by
...read more
cpp-input-output
C++
C++ Programs
Picked
CPP Examples
misc-cpp
1
2
3
>>
Last
1
2
3
>>
Last
1
2
3
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !