Which of the following writes the contents of the city and state variables to an output file
Question:
Which of the following writes the contents of the city and state variables to an output file named address.txt? The file is associated with the outFile object.
a. address.txt << city << state << endl;
b. ofstream << city << state << endl;
c. outFile >> city >> state >> endl;
d. outFile << city << '#' << state << endl;
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 30% (10 reviews)
d outF...View the full answer
Answered By
Ashok Kumar Malhotra
Chartered Accountant - Accounting and Management Accounting for 15 years.
QuickBooks Online - Certified ProAdvisor (Advance - QuickBooks Online for 3 years.
5.00+
3+ Reviews
10+ Question Solved
Related Book For
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell
Question Posted:
Students also viewed these Computer science questions
-
Which of the following writes the contents of the city variable to an output file named address.txt? The file is associated with the outFile object. a. address.txt < < city < < endl; b. ofstream < <...
-
Which of the following reads a number from an input file named managers.txt and stores the number in the salary variable? The file is associated with the inFile object. a. managers.dat < < salary; b....
-
Which of the following opens the payroll.txt file for output? The file is associated with the outPayroll object. a. outPayroll.open("payroll.txt"); b. outPayroll.open("payroll.txt", ios::out); c....
-
Consider a dynamic array where the capacity doubles when additional space is needed and shrinks by 50% when the size falls below 1/4 capacity. What will be the amortized big-O of an append()...
-
Repeat Problem 61 with the cost and revenue equations y = 65,000 +1,100x Cost equation y = 1,600x Cost equation Problem 61 Repeat Problem 61 with the cost and revenue equations y = 65,000 + 1,100x...
-
In each of the following indicate which reaction will occur faster. Explain your reasoning. (a) CH3CH2CH2CH2Br or CH3CH2CH2CH2I with sodium cyanide in dimethyl sulfoxide (b) 1-Chloro-2-methylbutane...
-
The following questions deal with audits by public accounting firms. Select the best response for each question. a. Which of the following best describes why an independent auditor is asked to...
-
The budget director of Feathered Friends Inc., with the assistance of the controller, treasurer, production manager, and sales manager, has gathered the following data for use in developing the...
-
Please I need help with this question You have just deposited $9,500 into an account that promises to pay you an annual interest rate of 6.2 percent each year for the next 8 years. You will leave the...
-
Let T be an ordered tree with more than one node. Is it possible that the preorder traversal of T visits the nodes in the same order as the postorder traversal of T? If so, give an example;...
-
Which function determines whether the open function was successful? a. is_open b. isopen c. isFileOpen d. is_FileOpen
-
Which of the following tells the computer to repeat the loop instructions until the end of the file is reached? The file is associated with the inFile object. a. while (inFile.eof()) b. while...
-
The accounting system has reported a large unfavorable variance for Buffett Companys production process. Conducting an investigation costs $7,000. If the process is actually out of control, the cost...
-
The case ABC Distribution distributes food products, mainly to major retailers. The critical success factors for the organization, as spelt out by its Managing Director and the Director of Finance,...
-
Use the information below to answer the questions that follow. Enter your answers using digits only - no dollar signs, commas, or decimal points. The business's year- end is December 31. Cost of...
-
A group of 12 consumers are considering whether to connect to a new social network. Index them as consumer 1, 2, 3, 4, ..., 12. Let n denote the size of the network and vi is value or...
-
Discuss the role of social networks in building social capital. How do these networks influence opportunities for social mobility and access to resources ?
-
A callable bond pays annual interest of $40, has a par value of $1000, matures in 4 years but is callable in 3 years at a price of $1100, and has a value today of $1020. What is the yield to call on...
-
1. Describe the four main types of workplace violence. 2. Describe the three classifications of prevention strategies employers should implement.
-
Fahrad Inc. sells all of its product on account. Fahrad has the following accounts receivable payment experience: Percent paid in the month of sale .........10 Percent paid in the month after the...
-
Create the logic for a program that prompts the user for numeric values for a month, day, and year. Then pass the three variables to the following methods: a. A method that displays the date with...
-
Create the logic for a program that computes hotel guest rates at Cornwalls Country Inn. Include two overloaded methods named computeRate(). One version accepts a number of days and calculates the...
-
Create the logic for a program that prompts a user for 12 numbers and stores them in an array. Pass the array to a method that reverses the order of the numbers. Display the reversed numbers in the...
-
This paragraph explains the findings from research in the . From this research, what effects did leaded gasoline have on society? Check all that apply
-
5 . If a good is imported into ( large ) country H from country F , then the imposition of a tariff in country H A ) raises the price of the good in both countries ( the "Law of One Price" ) . B )...
-
Which one is true? Question 2 2 options: The demand curve is upward sloping. The supply curve is downward sloping. Expectations influence both buyers and sellers. Technical improvement shifts the...
Study smarter with the SolutionInn App