11.2: Focus on Software Engineering: Combining Data into Structures: 10976

Question

Declare a structure whose tag name is Book and that contains exactly three fields (or members), each of type int. The first field is nCopies, the second field is nPages and the third field is nAuthors.

Solution
struct Book
{
    int nCopies, nPages, nAuthors;
};

No comments:

Post a Comment