Oh I remember that!
Uptown Func
Don't stop me now
OOPs I did it again!
MisTAKE me to dinner first
100

This sequence container behaves like a dynamic array, automatically resizing itself when elements are added or removed.

What is, std::vector?

100

What a function takes in.

What is a parameter / argument? 

100

The code for a loop that "never" ends.

What is, while(true)?

100

Public, Protected, Private

What are, access specifiers?

100

#include <iostream>

int main(){

std::cout << "Hello World"

return 0;

}

What is, missing a ";" on the 3rd line?

200

This is the specific standard library header file you must include to work with file streams such as ifstream and ofstream.

What is, <fstream>?

200

___ function() {}

^^^

What is, a return type?

200

This keyword is used to immediately exit and terminate a loop.

What is, break?

200

The difference between a class and struct.

What is, default access? (class is private, struct is public)

200

#include <string>

#include <iostream>

int returnName() {

std::string name;

std::cin >> name;

return name;

}

What is, incorrect return type!

300

 What Sonny says every time we discuss maps.

What is, key-value pairs?

300

A function that calls itself to solve smaller instances of the same problem.

What is, a recursive function?

300

In C++ conditional statements (like an 'if' statement), any non-zero number is treated as 'true', while this specific integer evaluates to 'false'.

What is, 0?

300

The OOP concept of bundling data and the methods that operate on them into a single unit (class), while hiding internal details.

What is, encapsulation?

300

#include <vector> 

int main() {

std::vector<char> vec = {'a','b','c'};

vec.delete('b');

return 0;

}

What is, incorrect vector function!

400

This C++ keyword is used to signal the occurrence of an anomalous or exceptional condition, passing an object to the nearest exception handler.

What is, throw?

400

he C++ feature that allows multiple functions to share the same name but have different parameters.

What is, overloading? 

400

nstead of terminating a loop, this keyword immediately skips the remaining code in the current iteration and jumps directly to evaluate the next loop cycle.

What is, continue?

400

The mechanism by which one class acquires the properties and behaviors (data and methods) of another class.

What is, inheritance? 

400

class Obj{

public:

    int num;

}


int main() {

Obj* heapObj = new Obj;

heapObj.num =5;

return 0;

}

What is, incorrect access operator OR memory leak?

500

This is the standard C++ base class from which all standard library exception classes (like std::runtime_error) inherit, containing the virtual member function what()

What is, std::exception?

500

A member function declared with this keyword in a base class can be overridden in a derived class.

What is, virtual?

500

The syntax for C++'s version of a for-each loop.

What is,

for(const auto& element : list)

500

The ability of different classes to respond to the same function call in their own unique way, often implemented via virtual functions.

What is, polymorphism?

500

int returnArr() {

    int array[5];

   return array;

}


int main() {

    int array = returnArray();

    return 0;

}


What is, passing stack array between functions!