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
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
DSA
22.3k+ articles
C++
4k+ articles
C++ Programs
2.5k+ articles
C Language
1.8k+ articles
Constructors
37 articles
Inheritance
32 articles
C++-Constructors
29 articles
C++-Virtual Functions
26 articles
C++-Inheritance
22 articles
Virtual Functions
16 articles
Programming Language
>
C++
>
C++ Quiz
C++ Quiz
140+ posts
Popular Articles
Recent Articles
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
...read more
STL
C++
C++ Quiz
C++ Programs
CPP-forward-list
Length of race track based on the final distance between participants
Last Updated: 14 November 2022
Given three integers A, B, and C, the task is to find the length of a race track if 3 racers are competing in a race where the first racer b
...read more
Interview Experiences
Algorithms
Mathematical
Competitive Programming
interview-preparation
Quizzes
Aptitude
C++ Quiz
C++ Programs
Java Programs
Python Programs
CAT Quiz
Postman
DSA
C/C++ Puzzles
Experiences
Replace the odd positioned elements with their cubes and even positioned elements with their squares
Last Updated: 09 December 2021
Given an array arr[] of n elements, the task is to replace all the odd positioned elements with their cubes and even positioned elements wit
...read more
Algorithms
Computer Subject
Puzzles
C Language
GeeksQuiz
CS - Placements
Computer Science Quizzes
C Quiz
C++ Quiz
C Programs
DSA
Similar Topics
DSA
22.3k+ articles
C++
4k+ articles
C++ Programs
2.5k+ articles
C Language
1.8k+ articles
Constructors
37+ articles
Inheritance
32+ articles
C++-Constructors
29+ articles
C++-Virtual Functions
26+ articles
C++-Inheritance
22+ articles
Virtual Functions
16+ articles
C++ | Misc C++ | Question 8
Last Updated: 28 June 2021
[sourcecode language="CPP"]#includeiostreamusing namespace std;int main (){ int cin; cin cin; cout cin cin; retur
...read more
C Language
C++ Quiz
C++-Misc C++
Misc C++
C++ | Inheritance | Question 12
Last Updated: 28 June 2021
[sourcecode language="CPP"]#includeiostreamusing namespace std;class Base{protected: int a;public: Base() {a = 0;}};class Derived1: p
...read more
C Language
C++ Quiz
C++-Inheritance
Inheritance
C++ | Exception Handling | Question 9
Last Updated: 28 June 2021
[sourcecode language="C"]#include iostreamusing namespace std;class Test { static int count; int id;public: Test() { count++; id =
...read more
Exception Handling
C Language
C++ Quiz
C++-Exception Handling
C++ | Exception Handling | Question 4
Last Updated: 28 June 2021
Output of following program[sourcecode language="C"]#includeiostreamusing namespace std;class Base {};class Derived: public Base {};int main
...read more
Exception Handling
C Language
C++ Quiz
C++-Exception Handling
C++ | Templates | Question 1
Last Updated: 28 June 2021
Which of the following is true about templates.1) Template is a feature of C++ that allows us to write one code for different data types.2)
...read more
C Language
C++ Quiz
C++-Templates
Templates
C++ | Inheritance | Question 6
Last Updated: 28 June 2021
[sourcecode language="C"]#includeiostreamusing namespace std;class Base {};class Derived: public Base {};int main(){ Base *bp = new Deriv
...read more
C Language
C++ Quiz
C++-Inheritance
Inheritance
C++ | Inheritance | Question 5
Last Updated: 28 June 2021
Output?[sourcecode language="C"]#includeiostreamusing namespace std;class Base {private: int i, j;public: Base(int _i = 0, int _j = 0
...read more
C Language
C++ Quiz
C++-Inheritance
Inheritance
C++ | Operator Overloading | Question 6
Last Updated: 28 June 2021
Predict the output[sourcecode language="CPP"]#includeiostreamusing namespace std;class A{ int i;public: A(int ii = 0) : i(ii) {} vo
...read more
C Language
C++ Quiz
C++-Operator Overloading
Operator Overloading
C++ | Operator Overloading | Question 5
Last Updated: 16 April 2021
How does C++ compiler differs between overloaded postfix and prefix operators?(A) C++ doesn't allow both operators to be overloaded in a cla
...read more
C++ Quiz
C++-Operator Overloading
Operator Overloading
C++ | Misc C++ | Question 2
Last Updated: 29 October 2018
[sourcecode language="C"]#includeiostreamusing namespace std;int x = 1;void fun(){ int x = 2; { int x = 3; cout ::x en
...read more
C Language
C++ Quiz
C++-Misc C++
Misc C++
C++ | this pointer | Question 3
Last Updated: 28 June 2021
Predict the output of following C++ program.[sourcecode language="C"]#includeiostreamusing namespace std;class Test{private: int x;public:
...read more
C Language
C++ Quiz
C++-this pointer
this pointer
C++ | Operator Overloading | Question 10
Last Updated: 28 June 2021
How can we restrict dynamic allocation of objects of a class using new?(A) By overloading new operator(B) By making an empty private new ope
...read more
C Language
C++ Quiz
C++-Operator Overloading
Operator Overloading
First
1
2
3
4
5
6
7
8
>>
Last
First
1
2
3
4
5
6
>>
Last
First
2
3
4
5
>>
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 !