Exam 9: Records Structs

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

In structs, you access a component by using the struct name together with the relative position of the component.

Free
(True/False)
4.8/5
(46)
Correct Answer:
Verified

False

Data in a struct variable must be read one member at a time.

Free
(True/False)
4.9/5
(29)
Correct Answer:
Verified

True

Which of the following is an allowable aggregate operation on a struct?

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

B

Consider the following struct definition: const int ARRAY_SIZE = 1000; struct listType { int listElem[ARRAY_SIZE]; int listLength; }; The statement that declares intList to be a struct variable of type listType is ____________________.

(Short Answer)
4.7/5
(42)

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

(Multiple Choice)
4.9/5
(39)

Consider the following statements: struct studentType1 { String name; Int ID; Double gpa; }; StudentType1 student1, student2; Struct studentType2 { String name; Int ID; Double gpa; }; StudentType2 student3, student4; Which of the following statements is valid in C++?

(Multiple Choice)
4.8/5
(46)

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.8/5
(36)

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

(Multiple Choice)
4.9/5
(41)

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

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

(Short Answer)
4.9/5
(40)

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

(Multiple Choice)
4.9/5
(35)

A struct is typically a ____ data structure.

(Multiple Choice)
4.8/5
(28)

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.8/5
(36)

A struct is a(n) ____________________, not a declaration.

(Short Answer)
4.9/5
(28)

Consider the following statements: struct personalInfo { \quad string name; \quad int age; \quad double height; \quad double weight; }; struct commonInfo { \quad string name; \quad int age; }; personalInfo person1, person2; commonInfo person3, person4; Which of the following statements is valid in C++?

(Multiple Choice)
4.8/5
(45)

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

(True/False)
4.9/5
(38)

A function can return a value of the type struct.

(True/False)
4.9/5
(30)

The syntax for accessing a struct member is structVariableName____.

(Multiple Choice)
4.8/5
(40)

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
(41)

Both arrays and structs are examples of ____________________ data types.

(Short Answer)
4.8/5
(34)
Showing 1 - 20 of 50
close modal

Filters

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