Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

COP2220 Summer 2017-Final-07/07/17 Page 8 of 11 39. Pointers to pointers is a te

ID: 3854778 • Letter: C

Question

COP2220 Summer 2017-Final-07/07/17 Page 8 of 11 39. Pointers to pointers is a term used to describe: a. Any pointer that points to a variable. b. Any two pointers that point to the same variable. c. Any two pointers that point to variables of the same type. d. Pointers used as formal parameters in a function header. e. Pointers whose contents are the address of another pointer Your answer: 40. Which of the following statements about structures is false ures is false? a. The elements in a structure should be logically related b. The elements in a structure may be the same or different types. c. A tagged structure is declared using the keyword TAG d. A tagged structure cannot have an identifier at the end of the block. e. A type definition must have an identifier at the end of the block. Your answer: 41. Which of the following statements about initializing structures is false? a. Initializers are enclosed in a set of braces ()) b. The initializer values must match their corresponding types in the structure. c. Structure initialization must be complete; that is, if one field is initialized all fields must be initialized d. The initializer values must be separated by commas. e. None of the above. Your answer 42. Suppose a structure variable named employee contains a field variable named identity, which of the following is the correct way to reference identity? a. employee_ identity b. ptr->employee_identity c. ptr->employee.identity d. (ptr).employee.identity e. employee.identity Your answer: 43. Given a pointer ptr to a structure containing a calendar date, which of the following statement correctly references the day of the week? a. date.day b. (date.day) c. ptr->date.day d. ptr->date->day e. None of the above. The University of North Florida Your answer School of Comouti

Explanation / Answer

39. e) pointer to pointer has an address of a location which has the address of the value. eg

*a = 5;

**p = a;

Here **p is the pointer to pointer.

40. c) The Tagged structure does is not declared using keyword tag. eg of tag structure declaration: -

here stdtype is a tag structure.

41. c) structure initialization can be incomplete i.e. if there are 3 variables in structure, and 1 is initialized in structure initialization, other 2 are initialized to default values.

42. e) employee.identity

structure variables are accessed using . operator.

43. c) Assuming date is also a structure, ptr->date.day is the right declaration.