Problem 5
This problem is designed to make sure you can write a program that swaps data passed into it such that the caller's data has been swapped. This is something that is done very frequently in manipulating Data Structures.
The Solution / Test Requirements
I want your program to demonstrate that you understand how to swap information passed into a function and have the calling routine print out the data before and after the call to verify the data has been swapped. Call your functions Swap and SwapStructs. Swap is a function that receives the information to swap. The information is two integers. How should Swap receive them? How should it process them? SwapStructs is a function that receives two structs to swap. How should SwapStructs receive them? How should it process them?
Your Test Main must:
1. Declare two integers and initialize them to the values 1 and -1.
2. Print out the integers.
3. Call Swap to swap the values.
4. Print out the values on return from the function.
5. Declare a struct that holds 2 integers using a typedef for the struct.
6. Dynamically allocate two separate variables using the typedef and fill the dynamically allocated structs, filling the first with the values 10 and 20 and the second with 30 and 40.
7. Print out the values in each of the structs
8. Call SwapStructs to swap the contents of the structs.
9. Print out the values in the structs on return.
10. Free the memory that was dynamically allocated.
For your convenience, here is an output of my program:
Before call..I= 1, J=-1 After call.. I=-1, J= 1
Before SwapStructs..ptr1 contains 10 and 20
Before SwapStructs..ptr2 contains 30 and 40
After SwapStructs..ptr1 contains 30 and 40
After SwapStructs..ptr2 contains 10 and 20
Process returned 0 (0x0) execution time : 0.034 s Press any key to continue.
In: Computer Science
Example:
Consider two projects. The first project pays benefits of $90 today and nothing else. The second project pays nothing today, nothing one year from now, but $100 two years from now. Which project would be preferred if the discount rate were 2%? What if the rate increased to 10%?
- For a discount rate of 2%, the present value calculations would be $90 for project one and $96.12 for project two; therefore, project two is preferred. At a rate of 10%, the PV of project one is still $90. For project two, the PV is now 100/1.1^2= 82.6; therefore, project one is preferred.
---------------------------------------------------------------------------------------------------------------------------------------------------------
How can I solve this questions below???????????????????????????????????
Consider two projects. The first project pays benefits of $90 today and nothing else. The second project pays nothing today, nothing one year from now, but $100 two years from now. Which project would be preferred if the discount rate were 2%? What if the rate increased to 8%?
In: Economics
1] On 1 January 2018 Panorama Ltd acquired equipment for $22 000, net of GST. The estimated residual value for the equipment is zero. Depreciation is calculated at 10% p.a) on the diminishing-balance basis. The depreciation expense for the year ended 31 December 2020 is:
|
a |
$1604. |
|
b |
$1782. |
|
c |
$1980. |
|
d |
$2200. |
2] The correct entry to record the purchase of a motor vehicle for $40 000 cash, plus 10% GST is which of the following?
|
a |
DR Motor vehicles $44 000; CR Bank $44 000. |
|
b |
DR Motor vehicles $40 000; DR GST receivable $4000; CR Bank $44 000. |
|
c |
DR Motor vehicles $44 000; CR Bank $40 000; CR GST collected $4000. |
|
d |
DR Motor vehicles $36 000; DR GST receivable $4000; CR Bank $40 000. |
3] After writing off bad debts of $1800 the allowance for doubtful debts account balance was $600 credit. What is the correct general journal entry to record an adjustment to bring the allowance for doubtful debts to 10% of accounts receivable of $22 000?
|
a |
DR Bad debts expense $1600; CR Allowance for doubtful debts $1600 |
|
b |
DR Allowance for doubtful debts $1600; CR Bad debts expense $1600 |
|
c |
DR Bad debts expense $1600; CR Accounts receivable $1600 |
|
d |
DR Allowance for doubtful debts $1600; CR Accounts receivable $1600 |
In: Accounting
Why is it important to prepare a financial budget?
Explain what is meant by the term "time value of money". For example, why might it be better to receive $8 today, over receiving a promise of $9 seven years from now?
How should one consider the time value of money when planning for retirement? Please share examples within your response.
In: Finance
Why is it important to prepare a financial budget? Explain what is meant by the term "time value of money". For example, why might it be better to receive $8 today, over receiving a promise of $9 seven years from now? How should one consider the time value of money when planning for retirement? Please share examples within your response.
In: Operations Management
Why is it important to prepare a financial budget?
Explain what is meant by the term "time value of money". For example, why might it be better to receive $8 today, over receiving a promise of $9 seven years from now?
How should one consider the time value of money when planning for retirement? Please share examples within your response.
In: Operations Management
Pearce’s Cricket Farm issued a 30-year, 8% semiannual bond 4 years ago. The bond currently sells for 94% of its face value. The company’s tax rate is 35%. Assume the par value of the bond is $1,000.
a. What is the pre-tax cost of debt? (Do not round intermediate calculations. Round the final answer to 3 decimal places.)
Pre-tax cost of debt %
b. What is the after-tax cost of debt? (Do not round intermediate calculations. Round the final answer to 3 decimal places.)
After-tax cost of debt %
c. Which is more relevant, the pre-tax or the after-tax cost of debt?
After-tax cost of debt
Pre-tax cost of debt
In: Finance
Strickler Technology is considering changes in its working capital policies to improve its cash flow cycle. Strickler's sales last year were $4,165,000 (all on credit), and its net profit margin was 8%. Its inventory turnover was 7 times during the year, and its DSO was 33 days. Its annual cost of goods sold was $2,450,000. The firm had fixed assets totaling $715,000. Strickler's payables deferral period is 39 days. Assume 365 days in year for your calculations. Do not round intermediate calculations.
1 a) Assuming Strickler holds negligible amounts of cash and
marketable securities, calculate its total assets turnover. Round
your answer to two decimal places.
b). Calculate its ROA. Round your answer to two decimal
places.
2.
a) Suppose Strickler's managers believe the annual inventory
turnover can be raised to 10 times without affecting sale or profit
margins. What would Strickler's cash conversion cycle have been if
the inventory turnover had been 10 for the year? Round your answer
to two decimal places.
b) What would Strickler's total assets turnover have been if the
inventory turnover had been 10 for the year? Round your answer to
two decimal places.
c). What would Strickler's ROA have been if the inventory turnover
had been 10 for the year? Round your answer to two decimal
place
In: Finance
A professor in the Computer Science department at United States Institute of Technology has just patented a new search engine technology and would like to sell it to you, an interested venture capitalist. The patent has a 17-year life. The technology will take a year to implement (there are no cash flows in the first year) and has an upfront cost of $100 million. You believe this technology will be able to capture 1% of the Internet search market, and currently this market generates profits of $1 billion per year. Over the next five years, the probability that profits will grow at 10% per year is 20% and the probability that profits will grow at 5% per year is 80%. This growth rate will become clear one year from now (after the first year of growth). After five years, profits are expected to decline 2% annually. No profits are expected after the patent runs out. The discount rate is 10%.
Calculate the NPV of undertaking the investment today. Express your answer in millions of $.
In: Finance
Linux
1. Give a command line (one command) for displaying the files lab1, lab2, lab3, and lab4. Can you give another command lines that do the same thing by making use of the file name similarities? What is the command line for displaying the files lab1.c, lab2.c, lab3.c, and lab4.c? (Hint: use shell metacharacters.)
2. How to determine the number of users who are logged on to Linux server system at this time? What command did you use to discover this?
3. Determine the name of the operating system that the Linux server runs. What command did you use to discover this
4. What are special files in UNIX? What are character special files and block special files? Run the ls /dev | wc -w command to find the number of special files that the linux server system has.
5. What is the inode number of the root directory on the linux server? Give the commands that you used to find the inode number.
In: Computer Science