1.
Which of the following are variables of type
Book
?
struct Book {
string title, author;
int yearPublished;
double price;
};
int main() {
Book gatsby = { "The Great Gatsby", "F. Scott Fitzgerald", 1925, 4.75 };
Book frankenstein = { "Frankenstein", "Mary Shelley", 1823, 5.99 };
string flies = "Lord of the Flies";
int year = 1954;
}
gatsby
gatsby
is aBook
.frankenstein
frankenstein
is aBook
.flies
flies
is astring
.year
year
is anint
.