Ask Question
2 December, 22:53

Write C code to define a structure called date that has three fields day, month, year, all of which are ints.

+4
Answers (1)
  1. 2 December, 23:23
    0
    The code to define a structure with the characteristics given is:

    struct date {

    int day;

    int month;

    int year;

    };

    Explanation:

    First you have to declare your structure using a data type struct (first line) and the name of the structure, inside brackets you define all the members of the structure and the type of each one following the next pattern:

    struct name_struct {

    type item1;

    type item2;

    / * ...

    };

    Finally we get into the correct answer:

    struct date {

    int day;

    int month;

    int year;

    };
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write C code to define a structure called date that has three fields day, month, year, all of which are ints. ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers