Using the definition below, which of the following declares a variable of struct type book with title “War & Peace” and price 27.99.

struct book {
string title;
float price;
};

a) book myBook;
title = “War & Peace”;
price = 27.99;

b) book myBook;
myBook.title = “War & Peace”, price = 27.99;

c) book myBook;
myBook[title] = “War & Peace”;
myBook[price] = 27.99;

d) book myBook;
myBook.title = “War & Peace”;
myBook.price = 27.99;


d) book myBook;
myBook.title = “War & Peace”;
myBook.price = 27.99;

Computer Science & Information Technology

You might also like to view...

Which of the following is not a common window element?

A) Ribbon B) Move button C) Close button D) Title bar

Computer Science & Information Technology

Taking ____ is the only way to shift control from one account to another.

A. ownership B. control C. possession D. permissions

Computer Science & Information Technology

Answer the following statement(s) true (T) or false (F)

If a company does not publish a policy stating that it reserves the right to inspect computing assets at will or display a warning banner, employees have an expectation of privacy.

Computer Science & Information Technology

What does >> accomplish when entered on the command line after a command?

a. It redirects Standard Error and Standard Input to the same location. b. It redirects both Standard Error and Standard Ouput to the same location. c. It appends Standard Output to a file. d. It does not accomplish anything.

Computer Science & Information Technology