// **************************************************
// Function: testOfficerStructure
//
// Description: Declares Starfleet officer structures
// and verifies compilation works
//
//
// Parameters: none
//
//
// Returns: 1 - successful execution
//
// ***************************************************
#include <stdio.h>
// supporting structure for dates
struct date {
int day;
int month;
int year;
};
// supporting structure for address
struct address {
char street[100];
char city[50];
char state[50];
char zip[20];
char planet[50];
};
// supporting structure for ship information
struct ship {
char shipName[50];
char nickname[50];
};
// support of officer info
struct officer {
char name[100];
char starFleetID[9];
struct date dateOfBirth;
struct address addr;
char rank[100];
struct date lastPromotionDate;
struct ship shipInfo;
float hourlyPay;
char favoriteSaying[100];
float startingStardate;
char maritalStatus[20];
struct date graduationDate;
};
// **************************************************
// Function: testOfficerStructure
//
// Description: Declares an array of officer
// structures and checks that the
// structure setup works
//
//
// Parameters: none
//
//
// Returns: 1 - successful execution
//
// ***************************************************
int testOfficerStructure()
{
struct officer officers[100];
officers[0].starFleetID[0] = '0';
return 1;
} //testOfficerStructure
int main()
{
int result;
result = testOfficerStructure();
printf("Result: %d\n", result
);
return 0;
}