Write a program to create a file sequentially called Output containing for each person: - Name...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program to create a file sequentially called "Output" containing for each person: - Name (20 characters max.) - Firstname (15 characters max.) - Age (integer) Phone (11 characters maximum). Information about different people will be read on the keyboard to populate the structure called "bloc". To finish prompting, press any character. The name of the output file is limited to 21 characters and opened in write (w) mode. Here is an example of the output: **** To finish the user prompting, press any character Lastname: Tremblay firstname: N. Age: 30 Phone: 123456 fwrite returned : 1 Total records written into the file is : 1 Lastname: Williams firstname: Smith Age: 23 Phone: 789 fwrite returned : 1 Total records written into the file is : 2 Lastname: Write a program to create a file sequentially called "Output" containing for each person: - Name (20 characters max.) - Firstname (15 characters max.) - Age (integer) Phone (11 characters maximum). Information about different people will be read on the keyboard to populate the structure called "bloc". To finish prompting, press any character. The name of the output file is limited to 21 characters and opened in write (w) mode. Here is an example of the output: **** To finish the user prompting, press any character Lastname: Tremblay firstname: N. Age: 30 Phone: 123456 fwrite returned : 1 Total records written into the file is : 1 Lastname: Williams firstname: Smith Age: 23 Phone: 789 fwrite returned : 1 Total records written into the file is : 2 Lastname:
Expert Answer:
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these programming questions
-
Write a program to create a dataset of information containing name and state of the applicants of Raffle Draw program. The records will all be saved in a file that will have a name in line with your...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
In Exercises solve the first-order differential equation by any appropriate method. y' = 2x1 - y
-
A child has a near point of 15 cm. What is the maximum magnification the child can obtain using a 9.5-cm-focallength magnifier? What magnification can a normal eye obtain with the same lens? Which...
-
The net weight (in oz) of a dry bleach product is to be monitored by x and R control charts using a sample size of n = 5. Data for 20 preliminary samples are shown in Table 6E.7. (b) Estimate the...
-
A Sampling Distribution for Average Salary of NFL Players Use StatKey or other technology to generate a sampling distribution of sample means using a sample of size \(n=5\) from the YearlySalary...
-
Happy Feet buys hiking socks for $6 a pair and sells them for $10. Management budgets monthly fixed costs of $12,000 for the relevant range of 0 (zero) to 12,000 pairs. Required Consider each of the...
-
RRumba Ltd is a small company based in St . Ann, Jamaica. They currently employ ten people.They are seeking to calculate their payroll costs for the month of December 2 0 2 3 . Sasha, the supervisor,...
-
The graph below shows the hours studied and the test grades on a biology test for 7 students. The red line on the graph can be used to approximate the test grade the average student receives for the...
-
Write the equation in spherical coordinates. (a) 5x2 3x + 5y2 + 5z2 = 0 3 sin (9) cos(0) X
-
Billy Ray Nibert was convicted of first-degree murder for stabbing Eugene Snavely seventeen times with a knife. The issue on appeal is simply determining the appropriate sentence for the crime. . . ....
-
On July 12, 1987, a fire broke out at the largely abandoned Crest apartment building in Seattle. Robert Earhart was one of nearly 70 City of Seattle fire fighters who responded to the alarm. Fire...
-
Each of appellants four convictions of forcible rape involved a different victim but a similar scenario. Count 1: V.B. In late October of 2007, V.B. was working as a prostitute on Motel Drive when...
-
Whenever a man does a thoroughly stupid thing, it is always from the noblest motives . . . The Government alleges that on or about February through February 10, 2010, Defendant committed the crime of...
-
We relate the evidence in the light most favorable to the Commonwealth. On the day of the incident, the sixty-six year old victim went to an apartment building that she owned. Her purpose was to...
-
3. Given the information below, calculate the company's cash balance at the end of the year. Cash Balance at Beginning of Year $80,000 Activity During the Year Increase in Accounts Payable Decrease...
-
Conduct a VRIO analysis by ranking Husson University (in Maine) business school in terms of the following six dimensions relative to the top three rival schools. If you were the dean with a limited...
-
Listing 6.7, PrimeNumberMethod.java, provides the isPrime(int number) method for testing whether a number is prime. Use this method to find the number of prime numbers less than 10000. Listing 1...
-
Revise Programming Exercise 31.1 to write a server for multiple clients. Write a server for a client. The client sends loan information (annual interest rate, number of years, and loan amount) to the...
-
Write a recursive method that returns the largest integer in an array. Write a test program that prompts the user to enter a list of eight integers and displays the largest element. Write a recursive...
-
Make an energy diagram for gas B in Figure 20.4. Figure 20.4 When gases of different temperatures are placed in thermal contact, energy is transferred thermally from the hotter to the cooler gas...
-
Suppose you were to play the two film clips shown in Figure 20.7 backward. Would the resulting processes be possible? Figure 20.7 Quasistatic versus non-quasistatic expansion of a cylin- der...
-
(a) What are the SI units of \(Q\) ? (b) For the process depicted in Figure 20.2a, make an energy diagram for each of these systems: (i) water, pot, and flame; (ii) pot and flame; (iii) pot. Figure...
Study smarter with the SolutionInn App