Question: Notes: This question about Unix Exercises : The following exercise are designed to get familiar with Unix (Linux) systems. For the result please include the

Notes:

This question about Unix Exercises :

The following exercise are designed to get familiar with Unix (Linux) systems.

For the result please include the terminal test outputs ( should include command line as well )

Notes: This question about Unix Exercises : The following exercise are designed

Please capture the INPUT and OUPUT

to get familiar with Unix (Linux) systems. For the result please include

Question 5 scanf Again Assume the input is in the form of date-month-year, such as 8- August-2006, how would you read the date, the month and the year? Note in this case, the month is not a number. It is a string. See the following code: int date; char month (BUF SIZE]; int year; printf("Please enter the date in the form of date- short month-year, "); printf(" such as 8-Aug-2006, where a month is written in exactly three letters: "); scanf("%d-%35-%d", &date, month, &year); Please note in scant, we pass the address of array month without using the address operator &. This is because the array name month itself represents the starting address of the array. Convert the above code into a complete program and test it with date inputs. /home/send_output_to_file.c-Sublime Text (UNREGISTERED) Selection Find View Goto Tools Project Preferences Help File Edit root@acer /home File Edit View Search Terminal Help root@acer:/home# gcc send output_to_file.c 66./a.out root@acer:/home# cat foo2 this is output root@acer:/home# send output_to_file.cx 1 #include 2 #include 3 int main(int argc, char const *argv[]) 4 { char *fname = "f0o2"; FILE *fstr; Please Capture like this fintf(stderr, "cannot open file %s, exit(1); } 7/ need to send output to file foo2 freopen(fname, "w", stdout); // this can b is is output "); return 0; 20 21 } Line 21 Column 2 Tab Size: 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!