Menu

[Solved]8 Suppose Opened Student Data File Following Data Formats 84652123 John 12 11 1995 1768008 Q37257110

8. Suppose you have just opened a student data file with the following data formats 84652123 John 12 11 1995 17680087 Mary 9

The language is C in case you need to know.

8. Suppose you have just opened a student data file with the following data formats 84652123 John 12 11 1995 17680087 Mary 9 21 1997 (more data) The first field in a row is the student id, the second is the student first name, the third is the month of the student’s birthday, and fourth is the day of the student’s birthday and the fifth is the year of the student’s birthday. What is the output of the following statements? Assume id is an int variable, first_name is a string variable, month, day, and year are int variables, value is an int variable value year) fscanf(pFile, “%d %s %d %d %d”, &id, first-name , &month, &day, printf (“%d”, value); Answer: Show transcribed image text 8. Suppose you have just opened a student data file with the following data formats 84652123 John 12 11 1995 17680087 Mary 9 21 1997 (more data) The first field in a row is the student id, the second is the student first name, the third is the month of the student’s birthday, and fourth is the day of the student’s birthday and the fifth is the year of the student’s birthday. What is the output of the following statements? Assume id is an int variable, first_name is a string variable, month, day, and year are int variables, value is an int variable value year) fscanf(pFile, “%d %s %d %d %d”, &id, first-name , &month, &day, printf (“%d”, value); Answer:

Expert Answer


Answer to 8. Suppose you have just opened a student data file with the following data formats 84652123 John 12 11 1995 17680087 Ma… . . .

OR


Leave a Reply

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