Course Solutions Uncategorized (Solved) : Include Include Include List Preprocessing Directives May Define Define Maxflightcodelen Q29097143 . . . .

(Solved) : Include Include Include List Preprocessing Directives May Define Define Maxflightcodelen Q29097143 . . . .

 

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

/*******************************************************************************

* List preprocessing directives – you may define your own.

*******************************************************************************/

#define MAX_FLIGHTCODE_LEN 6

#define MAX_CITYCODE_LEN 3

#define MAX_NUM_FLIGHTS 5

#define DB_NAME “database”

/*******************************************************************************

* List structs – you may define struct date and struct studentonly. Each

* struct definition should have only the fields mentioned in theassignment

* description.

*******************************************************************************/

struct date_time

{

int month;

int day;

int hour;

int minute;

};

typedef struct date_time date_time_t;

struct flight

{

char flightcode[MAX_FLIGHTCODE_LEN+1];

date_time_t departure_dt;

char arrival_city [MAX_CITYCODE_LEN+1];

date_time_t arrival_t;

};

typedef struct flight flight_t;

int main()

{

char second_choice[MAX_CITYCODE_LEN+1];

int i=0;

printf(“Enter arrival city code or enter * to show alldestinations>n”);

scanf(“%s”,second_choice);

if(i==0)

{

printf(“No flightsn”);

}

else if(strcmp(second_choice,”*”)==0){

while(i>0)

{

printf(“something”)

i–;

printf(“n”);

}

}

else

{

// some code to compare second_choice to the ” char arrival_city[MAX_CITYCODE_LEN+1] ” member of structure flight_t for everyflight_t type structure in the fligths array.

  

}

}

My task was

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Answered) : The theory that suggests that once an organization is successfully established in a particular environmental​ niche, it is unabl(Answered) : The theory that suggests that once an organization is successfully established in a particular environmental​ niche, it is unabl

The theory that suggests that once an organization is successfully established in a particular environmental​ niche, it is unable to adapt to changing conditions is the​________ theory. A. organizational learning B. population ecology C. strategic choice