202k views
0 votes
Assume that the type NAME has already been defined. Define a new type, SREC that is a structure consisting of two fields: name (a NAME) and grade (a string).

1 Answer

4 votes

Answer:

struct SREC

{

NAME name;

string grade;

};

Explanation:

The first line declares a new data type, a structure, of name SREC. The open and close braces, are used to contain other data fields or members, namely: name and grade variables.

The NAME has already been defined, hence there is no declaration method in the SREC structure.

User Robby Cornelissen
by
4.7k points