(3 pts) Fill in the blanks in the following C statement such that it allocates memory for an array of 50 character values:
char *name = ( ) malloc( );
(3 pts) Write a declaration for an array a of
10 strings, each of which has at most 80 characters (including the
null character):
__________________________________________
(6 pts) Circle or underline all syntax, logic, and runtime errors found in the following C fragment. Be sure to circle omitted punctuation.
char *name_ptr == NULL, name[50] = “Barack Obama”,
*name2 = “Joe Biden”;
name_ptr = name[0];
do
{
printf (“Enter a new name: ”)
scanf (“%c”, name_ptr);
while (name == name2);
(2 pts) What are two advantages of using recursion in a C program?
__________________________________________________________________
__________________________________________________________________
(8 pts) Complete the following statements based on this declaration. Assume that the operations are cumulative:
char taste[11] = "bitter", touch[5] = "soft";
The value of strlen(taste) is . The contents of touch[4] is .
The value of strcmp(“soft”, taste) is negative/positive/zero (circle one). The contents of touch after the call strncpy(touch, taste, 3) is . The contents of taste[2] after the call strncat(taste, &touch[3], 1) is .
In: Computer Science
Suppose a firm's marginal product of capital and marginal product of labor schedules are as shown in the table below. The firm hires both capital and labor competitively for $4 and $8, respectively. Its output is sold in a competitive market for $.50 per unit.
|
Capital |
MP of Capital |
Labor |
MP of Labor |
|
0 |
0 |
||
|
1 |
10 |
1 |
28 |
|
2 |
9 |
2 |
30 |
|
3 |
8 |
3 |
24 |
|
4 |
7 |
4 |
20 |
|
5 |
6 |
5 |
16 |
|
6 |
5 |
6 |
12 |
|
7 |
4 |
7 |
8 |
|
8 |
3 |
8 |
4 |
In: Economics
Suppose scores on a college entrance exam are normally distributed with a mean of 550 and a standard deviation of 100.
Find the score that marks the cut-off for the top 16% of the scores. Round to two decimal places.
Question 5 options:
|
450.55 |
|
|
649.45 |
|
|
462.89 |
|
|
508.34 |
Question 6 (1 point)
Suppose scores on a college entrance exam are normally distributed with a mean of 550 and a standard deviation of 100.
Find the cut-off scores that define the middle 60%. Round to two decimal places.
Question 6 options:
|
465.84 and 634.16 |
|
|
456.48 and 643.61 |
|
|
575.33 and 634.16 |
|
|
465.84 and 575.33 |
Question 7:
Suppose scores on a college entrance exam are normally distributed with a mean of 550 and a standard deviation of 100.
What is the probability that the sample mean score will be greater than 565, in a random sample of 100 entrance exams? Round to 4 decimal places
Question 7 options:
|
0.5596 |
|
|
0.4404 |
|
|
0.9332 |
|
|
0.0668 |
Question 8 (1 point)
The running time for videos submitted to YouTube in a given week is normally distributed with a mean of 390 seconds and a standard deviation of 148 seconds.
Suppose that a sample of 40 voters is selected. What is the probability that the mean running time for the sample exceeds six minutes? (Don't overlook: How many seconds are in 1 minute?)
Question 8 options:
|
0.5803 |
|
|
0.9001 |
|
|
0.9953 |
|
|
1 |
Question 9 (1 point)
On a certain television channel, 18% of commercials are local advertisers. A sample of 120 commercials is selected.
What is the probability that more than 20% of the commercials in the sample are local advertisers?
Question 9 options:
|
0.0 or 1 x 10-59 |
|
|
0.7081 |
|
|
0.2844 |
|
|
0.7158 |
Question 10 (1 point)
On a certain television channel, 18% of commercials are local advertisers. A sample of 120 commercials is selected.
Would it be unusual for more than 25% of the commercials in the sample are local advertisers?
Question 10 options:
|
No |
|
|
Yes |
In: Statistics and Probability
This is a Microbiology essay question. Please provide detailed answers.
There is no single gene that determines whether a bacterial cell
is gram positive or negative.
a. Give examples of two genes that code for parts of the cell wall
(gram positive, negative, or both).
b. Some phenotypes, like resistance to a particular antibiotic, are
gained and lost by a bacterial lineage frequently. Why don’t we see
bacterial lineages changing back and forth between gram positive
and negative?
In: Biology
Harry lost his watch and offers a reward of $100 to the person who returns it to him. Jim finds the watch, sees Harry's name and address on the watch and returns it (Jim never knew of the reward.) Two days later Joe told Jim that Harry had offered a reward and since he (Jim) had found the watch, he should collect it. Can Jim require Harry to pay him the reward?
Result:
Reason:
Exception:
In: Accounting
Please write at least two-paragraphs that addresses the following questions for your initial post:
In: Psychology
1) On January 1 of this year, Shannon Company completed the following transactions (assume a 8% annual interest rate): (FV of $1, PV of $1, FVA of $1, and PVA of $1) (Use the appropriate factor(s) from the tables provided.)
d. What single sum must be deposited in the bank on January 1 of this year? (Round your answer to nearest whole dollar.)
2) An investment will pay $15,600 at the end of each year for eight years and a one-time payment of $156,000 at the end of the eighth year. (FV of $1, PV of $1, FVA of $1, and PVA of $1) (Use the appropriate factor(s) from the tables provided.)
Determine the present value of this investment using a 7% annual interest rate. (Round your answer to the nearest whole dollar.)
In: Accounting
A copper ball of temperature 100 °C is immersed to a water bath of 50 °C. After 10 minutes the temperature of the ball is 80 °C and the temperature of the water is 60 °C. You may assume that Newton’s Law of Cooling is obeyed and all the heat lost by the ball is absorbed by the water. Find the equilibrium temperature of the ball as a function of time.
In: Other
An alternating annuity pays $1 in one year, −$2 in two years, $4 in three years, −$8 in four years, which each subsequent payment doubling and changing sign for 20 years. If the risk-free discount rate is 5%, what is the value of this alternating annuity?
In: Finance
Assume that the market rate of interest rises from 6% to 12%. Which one of the following two bonds would have higher price risk? Show your work.
In: Finance