Quiz on Classes and Inheritance

Test your understanding of classes and inheritance in C++ by taking this quiz.

1

What is the output of the code below?

#include <iostream>
using namespace std;

class Temporary {};
  
int main()
{
  cout << sizeof(Temporary);
  return 0;
}
A)

0

B)

Any non zero value

C)

Compiler Error

D)

Run time Error

Question 1 of 60 attempted

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy