Exam 9: Records (structs)
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Input/Output50 Questions
Exam 4: Control Structures I (Selection)50 Questions
Exam 5: Control Structures II (Repetition)50 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 (structs)50 Questions
Exam 10: Classes and Data Abstraction50 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, Abstract Classes, and Lists50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Linked Lists50 Questions
Exam 17: Stacks and Queues50 Questions
Exam 18: Searching and Sorting Algorithms50 Questions
Exam 19: Binary Trees50 Questions
Exam 20: Graphs50 Questions
Exam 21: Standard Template Library (STL)50 Questions
Select questions type
Figure 1:
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.
Free
(Short Answer)
4.8/5
(37)
Correct Answer:
newStudent alumnus;
A list has two items associated with it: ____.
Free
(Multiple Choice)
4.9/5
(41)
Correct Answer:
D
Arrays are passed by ____________________ only.
Free
(Short Answer)
4.7/5
(36)
Correct Answer:
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
{
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.9/5
(35)
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
{
double length;
double width;
double area;
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
{
string name;
int supplierID;
};
struct paintType
{
supplierType supplier;
string color;
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
{
double length;
double width;
double area;
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
{
double length;
double width;
double area;
double perimeter;
};
rectangleData bigRect;
Which of the following statements is valid in C++?
(Multiple Choice)
4.9/5
(35)
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
(39)
Figure 1:
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.9/5
(37)
In C++,the ____ symbol is an operator,called the member access operator.
(Multiple Choice)
4.9/5
(42)
Figure 1:
struct newStudent
{
string firstName;
string lastName;
string courseGrade;
int testScore;
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
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)