Tutorials
Go Premium
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.1K+ articles
Python
19.6K+ articles
Java
9.3K+ articles
Misc
7.8K+ articles
C++
3.7K+ articles
Python Programs
3.7K+ articles
Difference Between
3.1K+ articles
Solidity
111+ articles
Blockchain
91+ articles
java-swing
63+ articles
Programming Language
/
C++
/
C++ Quiz
C++ Quiz
11 posts
Recent Articles
Popular Articles
Why are negative numbers stored as 2's complement?
Last Updated: 11 July 2025
When doing addition/subtraction on binary numbers in other representations we need to apply different logics (circuits) to perform addition and subtraction. In 2s-compleme...
read more
Misc
C/C++ Puzzles
C Programs
C++ Programs
Programming Language
C++
Puzzles
C Quiz
C++ Quiz
Replace every character of a string by a different character
Last Updated: 02 September 2022
Given a string str of lowercase alphabets only. The task is to replace every character by some new character. The new character belongs to$a-z$(small case only) Replacemen...
read more
Misc
Strings
C++ Quiz
DSA
ASCII
Convert time from 24 hour clock to 12 hour clock format
Last Updated: 02 August 2022
Given a time in a 24-hour clock (military time), convert it to a 12-hour clock format.Note: Midnight is 00:00:00 on a 24-hour clock and 12:00:00 AM on a 12-hour clock. Noo...
read more
Technical Scripter
C++ Programs
C++ Quiz
Technical Scripter 2018
DSA
date-time-program
Constructive Algorithms
Default value of Vector in C++ STL
Last Updated: 12 July 2025
Vectors are the same as dynamic arrays with the ability to resize itself automatically when an element is inserted or deleted, with their storage being handled automatical...
read more
C++ Programs
C++
C++ Quiz
Write From Home
cpp-vector
Count of subarrays having sum as a perfect cube
Last Updated: 15 November 2022
Given an array arr[], the task is to count the subarrays having sum as a perfect cube.Examples:Input: arr[] = {6, 10, 9, 2, 1, 113}Output: 3Explanation:The subarrays with ...
read more
C++ Quiz
DSA
Arrays
subarray
maths-perfect-cube
Header Guard in C++
Last Updated: 15 July 2025
Header Guards in C++ are conditional compilation directives that help to avoid errors that arise when the same function or variable is defined more than once by the mistak...
read more
C++ Programs
Programming Language
C++
C++ Quiz
CPP-Basics
cpp-macros
How to access private/protected method outside a class in C++
Last Updated: 15 July 2025
Prerequisites: Access Modifiers in C++, Runtime PolymorphismPrivate: The class members declared as private can be accessed only by the functions inside the class. They are...
read more
C/C++ Puzzles
C++ Programs
C++
C++ Quiz
access modifiers
C++-Class and Object
Difference between int (*p)[3] and int* p[3]?
Last Updated: 24 November 2020
Pointers store the address of variables or a memory location. Pointers are a symbolic representation of addresses. They enable programs to simulate call-by-reference as we...
read more
C++ Programs
Difference Between
C++
C++ Quiz
C-Pointers
Pointers
Exit a loop in C++
Last Updated: 20 January 2021
Exit a Loop in C++: If the condition of an iteration statement (for, while, or do-while statement) is omitted, that loop will not terminate unless the user explicitly exit...
read more
C++ Programs
C++
C++ Quiz
loop
Loops & Control Structure
Generate Quadratic Equation having given sum and product of roots
Last Updated: 04 May 2021
Given two integers S and M, the task is to find the coefficients of the quadratic equation such that the sum and the product of the roots are S and M respectively.Examples...
read more
Greedy
Mathematical
C++ Quiz
DSA
Algebra
How to find Size of std::forward_list in C++ STL
Last Updated: 08 October 2021
Forward list in standard template library of C++. It comes under #includeforward_list header file. It is implemented as a singly linked list. It was introduced in C++ 11 f...
read more
C++ Programs
C++
C++ Quiz
STL
CPP-forward-list
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 !