Quiz Yourself on Structures

Test your understanding of the material presented in this chapter.

Structures

1

Given the following structure

struct MyStruct
{
   int x;
   int y;
   int z;
};

(Select all that apply.) Which of the following statements about the following declaration are correct?

MyStruct instance;
A)

The declaration is correct.

B)

The declaration is wrong.

C)

To make the declaration correct, we can change the structure definition like so:

typedef struct
{
   int x;
   int y;
   int z;
}MyStruct;
D)

The code won’t compile.

Question 1 of 70 attempted

Get hands-on with 1400+ tech skills courses.