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

2. If the follwing is a valid statement: w->x->y->z = 12; then: A. x, y and az a

ID: 3570039 • Letter: 2

Question

2. If the follwing is a valid statement:

      w->x->y->z = 12;

then:

A. x, y and az are structure variables

B. x, y and z are structure components

C. w, x and y are pointer variables

D. A and B statements are correct

E. B and C statements are correct

3. (*x). y->z = 5;

In the statement above

A. x is the structure variable

B. x is the pointer variable

C. y is the structure component

D. A and B statemnets are correct

E. B and C statemnets are correct

4. j.k.l = 30

In the statement aboce,

A. J is a structure component.

B. k is a structure component.

C. l is a structure component.

D. A and B statements are correct.

E. B and C statements are correct.

5. x.y.z = 20

In the statement above,

A. x is a structure variable.

B. y is a structure variable.

C. z is a structure variable.

D. A and B statements are correct.

E. B and C statements are correct.

Explanation / Answer

2. (C) w, x and y are pointer variables

Explanation:

In this w, x and y are the struct pointer type variables. There is a nested structure. At the end, it points to z variable. Z is the component of the structure. Thus, w, x and y are pointer variables.

3.   (B) x is the pointer variable

Explanation:

Here in this, x is the pointer variable whereas y is the structure variable and z is the structure component. Thus, x is the struct pointer type variable.

4.   (C) l is a structure component.

Explanation:

In this, j and k are the struct variables whereas l is the structure component.

5.   (D) A and B statements are correct.

Explanation:

In x.y.z=20, x and y are the structure variables and z is the structure component. In A x is a structure variable is given and in B, y is a structure variable is given. Here both are structure variable. Thus, A and B are correct.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote