Exam 9: Records (structs)

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

Figure 1: 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 ____________________ defines alumnus to be a struct variable of type newStudent.

Free
(Short Answer)
4.8/5
(37)
Correct Answer:
Verified

newStudent alumnus;

A list has two items associated with it: ____.

Free
(Multiple Choice)
4.9/5
(41)
Correct Answer:
Verified

D

Arrays are passed by ____________________ only.

Free
(Short Answer)
4.7/5
(36)
Correct Answer:
Verified

reference

Which of the following aggregate operations can be executed on array variables?

(Multiple Choice)
4.8/5
(44)

The components of a struct are called the ____ of the struct.

(Multiple Choice)
4.7/5
(31)

Aggregate input/output operations are allowed on a struct variable.

(True/False)
4.8/5
(33)

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 best describes applianceList?

(Multiple Choice)
4.9/5
(35)

A struct is typically a ____ data structure.

(Multiple Choice)
4.9/5
(41)

If a variable is passed by ____________________,then when the formal parameter changes,the actual parameter also changes.

(Short Answer)
4.9/5
(43)

Consider the following statements: struct rectangleData { \quad double length; \quad double width; \quad double area; \quad double perimeter; }; dectangleData bigRect; dectangleData smallRect; Which of the following statements is legal in C++?

(Multiple Choice)
4.9/5
(44)

Consider the following statements: struct supplierType { \quad string name; \quad int supplierID; }; struct paintType { \quad supplierType supplier; \quad string color; \quad string paintID; }; paintType paint; What is the data type of paint.supplier?

(Multiple Choice)
4.7/5
(41)

A(n)____________________ is a collection of a fixed number of components in which the components are accessed by name.

(Short Answer)
4.9/5
(35)

Consider the following statements: struct rectangleData { \quad double length; \quad double width; \quad double area; \quad double perimeter; }; rectangleData bigRect; Which of the following statements is valid in C++?

(Multiple Choice)
4.8/5
(38)

Consider the following statements: struct rectangleData { \quad double length; \quad double width; \quad double area; \quad double perimeter; }; rectangleData bigRect; Which of the following statements is valid in C++?

(Multiple Choice)
4.9/5
(35)

A struct variable can be passed as a parameter ____.

(Multiple Choice)
4.8/5
(45)

Consider the following statements: struct studentType1 { \quad string name; \quad int ID; \quad double gpa; }; studentType1 student1,student2; struct studentType2 { \quad string name; \quad int ID; \quad double gpa; }; studentType2 student3,student4; Which of the following statements is valid in C++?

(Multiple Choice)
4.8/5
(39)

Figure 1: 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 cout ____________________ outputs the variables firstName and lastName separated by one space.

(Short Answer)
4.9/5
(37)

You can use the assignment statement on structs.

(True/False)
4.7/5
(29)

In C++,the ____ symbol is an operator,called the member access operator.

(Multiple Choice)
4.9/5
(42)

Figure 1: 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
(36)
Showing 1 - 20 of 50
close modal

Filters

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