In a C++ structure, which of the following statements tells the compiler to allocate memory for an instance of the structure?

  • AStruct {... };
  • BTypedef struct {... } StructName;
  • CStructName var;
  • D#include <iostream>
Show answerHide answer

Correct answer C

In C++, when you use a statement like StructName var;, it tells the compiler to allocate memory for an instance of the structure StructName.