C Programming

Practise Exercise 9: Structures

JavaScript compatible inter-active version of this test.

1. Define a structure called record which holds an integer called loop, a character array of 5 elements called word, and a float called sum.

2. Declare a structure variable called sample, defined from a structure of type record.

3. Assign the value 10 to the field loop of the sample structure of type record.

4. Print out (using printf) the value of the word array of the sample structure.

5. Define a new structure called birthdays, whose fields are a structure of type time called btime, and a structure of type date, called bdate.

Answers


ęCopyright B Brown. 1984-1999. All rights reserved.