Question: COSC 2425 - Chapter 10 Review Questions True or False (1 point each) 1. A structure variable cannot be declared inside another structure. a. True

COSC 2425 - Chapter 10 Review Questions

True or False (1 point each)

1. A structure variable cannot be declared inside another structure.

a. True

b. False

2. When defining a structure variable, you can specify default values for zero or more of the structure fields.

a. True

b. False

3. An array can be declared as a structure member.

a. True

b. False

4. All fields in a UNION begin at the same offset.

a. True

b. False

5. When a macro is invoked, the CALL instruction executes if the macro uses the ASPROC operator.

a. True

b. False

6. A macro causes duplicate source code to be inserted into a program if the macro is invoked more than once.

a. True

b. False

7. Replacing macro invocations with procedure calls tends to make a program run faster.

a. True

b. False

8. The IFNOTB directive permits assembly if its argument is not blank.

a. True

b. False

9. The IFNDIF directive permits assembly if two arguments are equal.

a. True

b. False

10. The IFDIFI directive performs a case-insensitive comparison between two arguments.

a. True

b. False

11. The following statement permits assembly if the symbol Win32 has been defined:

IFDEF Win32

a. True

b. False

12. The following statement permits assembly if arg1 is exactly the same as arg2? (case-sensitive comparison):

IFIDN , a. True

b. False

13. The following statements create five uninitialized DWORD variables in which each variable name is a member of the following list: monday,tuesday,wednesday,thursday,friday:

FOR varName,

DWORD varName <>

ENDM

a. True

b. False

14. The following statements exit a macro if the count argument is blank:

IFB

EXITM

ENFIF

a. True

b. False

15. The following macro moves any 32-bit memory operand to any other 32-bit memory operand:

mMove32 MACRO destination,source

push eax

mov eax,source

mov destination,eax

pop eax

ENDM

a. True

b. False

16. Within a structure definition, fields are defined exactly the same as ordinary variables using the same syntax.

a. True

b. False

17. The ALIGN directive always sets the address alignment of the next field or variable in a structure to a doubleword boundary to improve memory performance.

a. True

b. False

18. Reference to a named member of a structure does not require a structure variable as a qualifier.

a. True

b. False

19. The storage size of a union is equal to the sum of its individual fields.

a. True

b. False

20. No more than one initializer is permitted when declaring and initializing a union.

a. True

b. False

21. A union can contain a structure.

a. True

b. False

22. When a blank argument is received by a macro, the preprocessor can substitute a default value only if a default value has been previously defined.

a. True

b. False

23. The expansion operator (&) expands text macros.

a. True

b. False

24. A structure definition does not take up any memory.

a. True

b. False

25. The FOR directive repeats a statement block based on the value of a counter.

a. True

b. False

26. The result of invoking a macro is also know as inline expansion.

a. True

b. False

27. The preprocessor treats all macro parameters as text, even if they are integers, or other values.

a. True

b. False

28. Comment lines in a macro definition only appear each time a macro is expanded when they are preceded by a double semicolon (;;).

a. True

b. False

29. Macros often contain both code and data.

a. True

b. False

30. When used within macros, the conditional-assembly directive IF must be followed by a boolean expression, a register, or a variable name.

a. True

b. False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!