WorksheetsCSNP-04103 C++ Chapter 9-2 - Structs
Total questions: 10
Worksheet time: 5mins
Struct stores collection of values of different types, how many types?.
Multiple values but only one type at a time.
You can't store different data types values with structs.
any data type including type objects created by the programmer.
any data type except type objects created by the programmer.
How do you call the individual components of a struct?
Share holders
Members
Family group
Associated group
Check-mark below what can you do with a struct ?
Initialization of the structure.
Use of the structure to declare a new variable (instantiation).
Access of members of the structure.
declaration of the structure.
Structs are typically declared as
Local
Global
Select the instruction below that copies the values of a struct into other.
color2 == color1;
color2 = color1;
copy color2 color1
cp color2 color1
Passing a struct to a function as an argument can increase the argument list?.
True
False
Passing a struct by value to a function can be inefficient?
True
False
The statement "employee company[10]; " is
An enum
A dimensional array
An array of type struct
An invalid statement
The statement: char name[10] = "jackson"; is
A string
A c-string array
An array of characers
A arrangement of characters
The instruction "c_str" us used to?
Create a string
It is a compiler directive
Convert a string into a c_str type
That is not a valid C++ instruction
