Exam 9: Records Structs

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

struct newStudent { \quad string firstName; \quad string lastName; \quad string courseGrade; \quad int testScore; \quad int programmingScore; }; int score; -Consider the accompanying struct definition. The statement that assigns the average of testScore and programmingScore to score is ____________________.

(Short Answer)
4.9/5
(26)

You can use the assignment statement on structs.

(True/False)
4.8/5
(45)

A function can return a value of the type array.

(True/False)
4.7/5
(48)

Typically, in a program, a struct is defined ____ in the program.

(Multiple Choice)
4.9/5
(27)

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

(Multiple Choice)
4.9/5
(43)

struct newStudent { \quad string firstName; \quad string lastName; \quad string courseGrade; \quad int testScore; \quad int programmingScore; }; int score; -Consider the accompanying struct definition in Figure 1. The statement that initializes the member testScore to 95 is ____________________.

(Short Answer)
4.9/5
(36)

Consider the following statements: struct supplierType { \quad string name; \quad int supplierID; }; struct applianceType { \quad supplierType supplier; \quad string modelNo; \quad double cost; }; applianceType applianceList[25]; Which of the following statements correctly initializes the cost of each appliance to 0?

(Multiple Choice)
4.7/5
(30)

The contents of a struct variable must be written one member at a time.

(True/False)
4.8/5
(37)

An array name and index are separated using ____.

(Multiple Choice)
5.0/5
(37)

The following statement defines a struct houseType with a total of ____________________ member(s). struct houseType { string style; \quad int numOfBedrooms; \quad int numOfBathrooms; \quad int numOfCarsGarage; \quad int yearBuilt; };

(Short Answer)
4.8/5
(30)
Showing 41 - 50 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)