Ch. 9 review

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

T or F All members of a struct must be of different types.

A struct is a heterogeneous data structure. The components of a struct are called the member of the struct. The members of the struct can be of different data types. it is not mandatory that all the members of a structure to be of different data types. Hence, the statement is FALSE.

T or F A struct variable must be declared after the struct definition.

A struct is a user defined data type. A struct must be defined first. Struct definite3s the members of the struct. After defining the structure, a variable of structure is declared. Hence, the statement is TRUE.

T or F A struct member is accessed by using the operator: (.)

A struct member is accessed with a struct name followed by a dot (.) operator followed by the member name. To access a struct member, the struct variable name together with a member name should be used. The names should be separated by a dot (.) operator. Hence, the statement is FALSE.

T or F A struct is a definition, not a declaration.

Struct is a keyword. It defines the members of the struct. It is treated as a definition. No memory is allocated to a structure at the time definition of the structure. When a variable of structure is declared, then memory will be allocated. Hence, the statement is FALSE.

T or F The allowable operations on a struct are assignment and member selection.

The struct can allow only the assignment operation and member access operations. The value of one struct variable can be assigned to another struct variable by using an assignment statement. The members of struct can be assessed by using a dot operator. Hence, the statement is TRUE.


Set pelajaran terkait

Business Analytics Test 1: Dr. Forest Chapter 1

View Set

ISC(2) CAP: RMF Roles & Responsibilities

View Set

Ch 38 ass of dig and gas fun 😜

View Set

Chapter 1: Mass Communication, Culture, and Media Literacy

View Set

español direct object nouns and pronouns

View Set