subject

Answer the following true/false questions using the code that follows. You must correctly state WHY your answer is true or false in order to receive credit.
# include
# include
# include
#define SIZE 4
typedef struct dessert{
char size;
float price;
charflavor[20]:
int available;
}dessert;
void give info(dessert *des, int size, char filename)
{
FILE *fp=fopen(filename,"r");
char *token;
char line[40];
int i
for(i 0:i {
fgets(line, 40, fp);
token-strtok(line,"":
des[i].size=token[0];
token strtok(NULL,".");
des[i. price-atof token);
token strtok(NULL,",");
strcpy(des[i].flavor, token):
token strtok(NULL,"n)
desi available-atoi(token);
}
fclose(fp):
}
void print report(dessert "d, int size)
{
int i
printf(nCURRENT INVENTORY: n");
for(i 0 i {
printf(" Info for Item %d \n", (i+ 1));
printf("Size: %<\n", (*d)size);
printf(" Price: 962f\n", ("d).price);
printf(" Flavor: %s\n", (*d) flavor);
printf("Ava ili blity: %d\n\n", ("d).available);
d ++:
}
}
int main (int argc, char "argv)
{
int num-atoi(argv1);
dessert "des (dessert)malloc(sizeof dessert) num):
if(des-=NULL)
{
printf ("Error getting you some memory! Bye. In");
}
else
{
give jinfo(des, num, argv[21):
print report(des, num):
}
free(des):
}
True / False:
1) The function printf is defined in this program.
2) stdio. h is the function that allows us to output to screen.
3) This code includes one header and two preprocessor directives.
4) argc is a function.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:30
The most common battery cable terminal is a that provides a large surface contact area with the ability to tighten the terminal onto the battery post using a nut and bolt.
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Which of the following would you find on a network
Answers: 3
question
Computers and Technology, 23.06.2019 18:30
This program should be a short piece of code that prints all of the positive integers from 1 to 100 as described more fully below. the program may contain multiple methods, and if using an oo language, should be contained within a single class or object. the program should be designed so that it begins execution when invoked through whichever mechanism is most common for the implementation language. â–ş print out all positive integers from 1 to 100, inclusive and in order. â–ş print messages to standard output, matching the sample output below. â–ş in the output, state whether the each integer is 'odd' or 'even' in the output. â–ş if the number is divisible by three, instead of stating that the number is odd or even, state that the number is 'divisible by three'. â–ş if the number is divisible by both two and three, instead of saying that the number is odd, even or divisible by three; state that the number is 'divisible by two and three'. â–ş design the logic of the loop to be as efficient as possible, using the minimal number of operations to perform the required logic. sample output the number '1' is odd. the number '2' is even. the number '3' is divisible by three. the number '6' is divisible by two and three.
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Which of the following includes the three primary network access technologies? dsl, cable modem, broadband lan, wan, man voip, uc, iptv tcp/ip, ftp, dhcp
Answers: 2
You know the right answer?
Answer the following true/false questions using the code that follows. You must correctly state WHY...
Questions
question
Mathematics, 14.09.2020 15:01
question
Mathematics, 14.09.2020 15:01
question
Mathematics, 14.09.2020 15:01
question
Mathematics, 14.09.2020 15:01
question
History, 14.09.2020 15:01
question
Mathematics, 14.09.2020 15:01
question
Mathematics, 14.09.2020 15:01
question
Mathematics, 14.09.2020 15:01
question
Geography, 14.09.2020 15:01
question
Mathematics, 14.09.2020 15:01
question
Mathematics, 14.09.2020 15:01
question
Chemistry, 14.09.2020 15:01
question
Mathematics, 14.09.2020 15:01
question
Mathematics, 14.09.2020 15:01
question
Mathematics, 14.09.2020 15:01
question
Mathematics, 14.09.2020 15:01
question
Mathematics, 14.09.2020 15:01
question
Arts, 14.09.2020 15:01
question
Mathematics, 14.09.2020 15:01
question
Mathematics, 14.09.2020 15:01
Questions on the website: 13722363