Exam 9: Records Structs
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C50 Questions
Exam 3: Inputoutput50 Questions
Exam 4: Control Structures I Selection50 Questions
Exam 5: Control Structures II Repetition50 Questions
Exam 6: User-Defined Functions50 Questions
Exam 7: User-Defined Simple Data Types, Namespaces, and the String Type50 Questions
Exam 8: Arrays and Strings50 Questions
Exam 9: Records Structs50 Questions
Exam 10: Classes and Data Abstraction49 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Searching, Sorting and the Vector Type50 Questions
Exam 17: Linked Lists50 Questions
Exam 18: Stacks and Queues50 Questions
Select questions type
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:
False
Data in a struct variable must be read one member at a time.
Free
(True/False)
4.9/5
(29)
Correct Answer:
True
Which of the following is an allowable aggregate operation on a struct?
Free
(Multiple Choice)
4.9/5
(34)
Correct Answer:
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
{
string name;
int supplierID;
};
struct applianceType
{
supplierType supplier;
string modelNo;
double cost;
};
applianceType applianceList[25];
Which of the following best describes applianceList?
(Multiple Choice)
4.8/5
(36)
Consider the following statements: struct rectangleData
{
double length;
double width;
double area;
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
{
string firstName;
string lastName;
string courseGrade;
int testScore;
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)
struct newStudent
{
string firstName;
string lastName;
string courseGrade;
int testScore;
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)
Consider the following statements: struct personalInfo
{
string name;
int age;
double height;
double weight;
};
struct commonInfo
{
string name;
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)
The syntax for accessing a struct member is structVariableName____.
(Multiple Choice)
4.8/5
(40)
Consider the following statements: struct rectangleData
{
double length;
double width;
double area;
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
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)