What will the following two-file program display? // file1.cpp #include using namespace std; void other(); void another();
Question:
What will the following two-file program display?
// file1.cpp
#include
using namespace std;
void other();
void another();
int x = 10;
int y;
int main()
{
cout << x << endl;
{
int x = 4;
cout << x << endl;
cout << y << endl;
}
other();
another();
return 0;
}
void other()
{
int y = 1;
cout << "Other: " << x << ", " << y << endl;
}
// file 2.cpp
#include
using namespace std;
extern int x;
namespace
{
int y = -4;
}
void another()
{
cout << "another(): " << x << ", " << y << endl;
}
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 66% (9 reviews)
I need to make a program that prompts the user for the names of ...View the full answer
Answered By
Dudhat Vaidehi
I tutored mostly elementary school students privately after school and during the summer. We met in their homes or at the public library. I charged an hourly fee, and I provided any necessary materials.
Having taught in special education in two local schools for many years meant that I had contact with a lot of parents of special needs students. I never had to advertise — word of mouth was how most folks knew of me. At one point I did have a website, but didn't utilize it much. I stayed very busy, especially in the summers, and always had a full schedule. I typically met with each student's teacher in order to get an idea of what the focus of my instruction/remediation should be. Becoming familiar with the student's learning style(s) was also very helpful. Often parents would share records and test results with me. After each tutoring session, I documented the student’s progress and gave parents written updates, as well as phone calls or emails as needed.
While my students and I certainly utilized technology and the internet often during our sessions, I never tutored online or for any tutoring company, so am not familiar with the curriculums or methods used in those settings.
Tutoring one on one was very enjoyable and rewarding. My students and I had fun, and grew quite fond of one another. The extra income was a bonus. I had to retire from tutoring due to a physically handicapping disease, and miss my students very much.
0.00
0 Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
What will the following code display in message boxes? Dim intX As Integer = 1 Do MessageBox.Show(intX.ToString) intX = intX + 1 Loop Until intX > 5
-
What will the following code display in message boxes? Dim intX As Integer = 1 Do While intX < 5 MessageBox.Show(intX.ToString) intX += 1 Loop
-
What will the following program display? #include using namespace std; void other(); namespace n1 { int x = 1; } namespace n2 { int x = 2; } int main() { using namespace n1; cout < < x < < endl; {...
-
Posting the entries from the sales journal to the accounts receivable subsidiary ledger should be done ______. a). at the end of each month b). on a weekly basis c). on a daily basis d). only at the...
-
What is the purpose of stock market exchanges such as the New York Stock Exchange?
-
A person pulls horizontally on block B in Fig. 4.35, causing both blocks to move together as a unit. While this system is moving, make a carefully labeled free-body diagram of block A if (a) The...
-
Blissful Ltd specialises in bridal wear. The store operates two departments gowns and shoes. The following information was obtained from the stores accounting records for the year ended 30 June...
-
Digital-Tech Inc., a specialized equipment manufacturer, uses a job order costing system. The overhead is allocated to jobs on the basis of direct labor hours. The overhead rate is now $2,500 per...
-
Refer to the Christopher Doner case at: https://www.policefoundation.org/wp-content/uploads/2015/07/Police-Under-Attack.pdf to answer each of the following questions. 1. Discuss at least three things...
-
ErgoFurn, Inc. manufactures ergonomically designed computer furniture. ErgoFurn uses a job order costing system. On November 30, the Work in Process Inventory consisted of the following jobs: On...
-
Provide method definitions for the class described in Chapter Review Question 5 and write a short program that illustrates all the features. Data From Question 5 Define a class to represent a bank...
-
Suppose you want the average(3,6) function to return an int average of the two int arguments when it is called in one file, and you want it to return a double average of the two int arguments when it...
-
The following is an alphabetical list of Bud's Bakery's adjusted account balances at the end of the company's fiscal year on November 30, 2014: Additional facts: 1. Bud's Bakery uses a periodic...
-
Commencing 1 April 2022, Morgan Landscaping Pty Ltd (morgan) provided Larissa (an employee) with the use of a Volkswagen Golf car. The car cost $55,000 (including GST) and was used privately every...
-
If your BN CO wants to fund an activity scheduled to occur in November 2023, and today is February 16, 2023, who would be the best person to advise on this activity? S4, S6, or S8? Also, if the CO...
-
Calibash, Inc. is a large employer, who has decided to implement employee achievement awards through a non-qualified plan. They have 10 employees, and will distribute $50,000 amongst the 10 of them....
-
Inflation Bonds (I Bonds) are safe investments issued by the U.S. Treasury to protect individual's money from loosing value due to inflation. Interest rates on I Bonds are adjusted regularly to keep...
-
Country A is endowed with 18 units of good x and 1 unit of good y, while country B is endowed with 2 units of good x and 7 units of good y. Both countries consume x and y in fixed and equal...
-
A chain letter starts with a person sending a letter out to 10 others. Each person is asked to send the letter out to 10 others, and each letter contains a list of the previous six people in the...
-
Accounting policies and practices that are most important to the portrayal of the companys financial condition and results, and require managements most difficult, subjective, or complex judgments...
-
Assume that a one-dimensional array named intArray of type int is declared, created, and initialized correctly. Write a code segment to compute the sum of all numbers stored in the even-numbered...
-
Indicate whether the following statements are syntactically correct or incorrect. If incorrect, indicate what is wrong with the statement: A. int [] array[]; *B. double data [] = new data []; *C. int...
-
Repeat the previous exercise using dialog boxes for input and output. An input dialog box is used to input a name of the organization. Then, a message dialog box displays the abbreviation of the...
-
The sheet Inventory lists a grocery store's inventory for two months. Calculate the percent change for each item to two decimal places. If the formula gives an error, put "Initial Stock" in the cell....
-
A local manufacturer produces two different products on the same production line. Product A requires .5 hours of labor while product B requires .8 hours of labor. The total labor available in any one...
-
Hampton Company reports the following information for its recent calendar year. Income Statement Data Sales Expenses: Cost of goods sold Salaries expense Depreciation expense Net income Required:...
Study smarter with the SolutionInn App