Which of the following struct definitions is correct in C++?

A. struct studentType
{
 int ID;
};
B. struct studentType
{
  string name;
  int ID;
  double gpa;}
 
C. int struct studentType
{
  ID;
}
 
D. struct studentType
{
  int ID = 1;
};
 


Answer: A

Computer Science & Information Technology

You might also like to view...

A special method that is invoked to set up an object during instantiation is called a ___________________.

a) new method b) dot operator c) creator d) constructor e) destructor

Computer Science & Information Technology

Describe spam filtering settings often found on email clients.

What will be an ideal response?

Computer Science & Information Technology

The four lines that mark the edges of a cell are called ____.

A. rows B. columns C. borders D. margins

Computer Science & Information Technology

The ________ is deployed directly to users and contains non-data objects such as queries, reports, forms, macros, and VBA modules

A) linked table B) back-end database C) database splitter D) front-end database

Computer Science & Information Technology