struct personalInfo
{
char name[ 50 ] ;
char dateOfBirth[ 50 ] ;
char address[ 150 ] ;
char martialStatus[ 50 ] ;
char nickname[ 50 ] ;
char favoriteSaying[ 100 ] ;
} ;
struct dates{
char lastPromotionDate[ 50 ] ;
float startingStarDate;
char starfleetGradDate[ 50 ] ;
} ;
struct otherEmployInfo{
char rank[ 50 ] ;
char ship[ 50 ] ;
char starfleetID[ 50 ] ;
float hourlyPay;
} ;
struct officer
{
struct personalInfo infoPersonal;
struct dates infoDates;
struct otherEmployInfo infoOtherEmploy;
} ;
#include <stdio.h>
int main( void ) {
struct personalInfo person1 = { "Mr. James Tiberius Kirk" , "March 22, 2233" , "23 Falling Rock, Riverside, Iowa 52327-0021 Planet Earth" , " Single" , " Jim" , "Bones???" } ;
// Print the initialized structure
printf ( "Name: %s\n " , person1.
name ) ; printf ( "Date of Birth: %s\n " , person1.
dateOfBirth ) ; printf ( "Address: %s\n " , person1.
address ) ; printf ( "Martial Status: %s\n " , person1.
martialStatus ) ; printf ( "Nickname: %s\n " , person1.
nickname ) ; printf ( "Favorite Saying: %s\n " , person1.
favoriteSaying ) ; return 0 ;
}
c3RydWN0IHBlcnNvbmFsSW5mbwp7CiAgICBjaGFyIG5hbWVbNTBdOwogICAgY2hhciBkYXRlT2ZCaXJ0aFs1MF07CiAgICBjaGFyIGFkZHJlc3NbMTUwXTsKICAgIGNoYXIgbWFydGlhbFN0YXR1c1s1MF07CiAgICBjaGFyIG5pY2tuYW1lWzUwXTsKICAgIGNoYXIgZmF2b3JpdGVTYXlpbmdbMTAwXTsKCn07CgpzdHJ1Y3QgZGF0ZXN7CiAgICBjaGFyIGxhc3RQcm9tb3Rpb25EYXRlWzUwXTsKICAgIGZsb2F0IHN0YXJ0aW5nU3RhckRhdGU7CiAgICBjaGFyIHN0YXJmbGVldEdyYWREYXRlWzUwXTsKCn07CgpzdHJ1Y3Qgb3RoZXJFbXBsb3lJbmZvewogICAgY2hhciByYW5rWzUwXTsKICAgIGNoYXIgc2h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