Use the code below to answers the following 3 questions (). #include using namespace std; int...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Use the code below to answers the following 3 questions (). #include <iostream> using namespace std; int x (int&, int); int y(int); void z (double []); int main () { int a2, b-3, c=10; double r [3]= (1.2, 3.3, -0.2); a + x(++a, 1); by (c)+ 5; c = x (c, 1) + y (b); cout << "a = " << a << endl; cout << "b = " << b << endl; cout << "c = " << c << endl; z (r); cout << r[0] << endl; return 0; 0 1.2 int x (int & c, int 2) { } int { b = 10 y(int QQ) if (QQ 83 == 1) return 5; else if (QQ_$5 ==0) return 0; else return 1; c++; return 2; void z (double b[]) { 39. What will be output by the final cout statement in main()? a. 3.3 d. 0.2 b. e. Cannot be determined from given code C. 40. What will be output by the first cout statement in main ()? a. a=1 b. a=5 C. a=7 d. a = 3 e. a = 2 41. What will be output by the second cout statement in main ()? a. d. b=4 b=8 b. b=5 c. b=3 C. double t; t = b[0]; b[0] = b[1]; b[1] = b[2]; b[2] =t; Use the code below to answers the following 3 questions (). #include <iostream> using namespace std; int x (int&, int); int y(int); void z (double []); int main () { int a2, b-3, c=10; double r [3]= (1.2, 3.3, -0.2); a + x(++a, 1); by (c)+ 5; c = x (c, 1) + y (b); cout << "a = " << a << endl; cout << "b = " << b << endl; cout << "c = " << c << endl; z (r); cout << r[0] << endl; return 0; 0 1.2 int x (int & c, int 2) { } int { b = 10 y(int QQ) if (QQ 83 == 1) return 5; else if (QQ_$5 ==0) return 0; else return 1; c++; return 2; void z (double b[]) { 39. What will be output by the final cout statement in main()? a. 3.3 d. 0.2 b. e. Cannot be determined from given code C. 40. What will be output by the first cout statement in main ()? a. a=1 b. a=5 C. a=7 d. a = 3 e. a = 2 41. What will be output by the second cout statement in main ()? a. d. b=4 b=8 b. b=5 c. b=3 C. double t; t = b[0]; b[0] = b[1]; b[1] = b[2]; b[2] =t;
Expert Answer:
Answer rating: 100% (QA)
Lets go through the code provided step by step to answer the three questions First we will evaluate ... View the full answer
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Posted Date:
Students also viewed these programming questions
-
Correct the errors in the lines of code shown in Figure 4-34. (The code contains eight errors.)
-
This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of an array of objects as a class data...
-
A trader has made a sale of Rs.75,500 out of which cash sales amounted to Rs.25,500. He showed trade receivables on 31-3-2014 at Rs.25,500. Which concept is followed by him? a) Going concern b) Cost...
-
Determine whether the relation represents y as a function of x. 1. Domain, x Range, y 2. Domain, x Range, y 3. 4. -2 -5 .7 8. 2- -2 -1
-
Managers at Wagner Fabricating Company are reviewing the economic feasibility of manufacturing a part that the company currently purchases from a supplier. Forecasted annual demand for the part is...
-
Dharug Ltd is an Australian company with two foreign operations, one in Indonesia and the other in South Korea. The Indonesian operation has as its major activity the distribution in Indonesia of...
-
Jennifer Brent Corporation owns equipment that cost $80,000 and has a useful life of 8 years with no salvage value . On January 1, 2011, Jennifer Brent leases the equipment to Donna Havaci Inc. for...
-
What piece of hardware connects a peripheral device like a keyboard or mouse to the system bus? 1 point a device driver a device controller a semaphore a network port
-
During orientation, unique group roles emerge. This becomes particularly apparent while working on case presentations. The following interaction occurred during a brainstorming session: Joan: "We are...
-
The client then provides you with the following situation. A flat plate of 50 cm is being pulled over a fixed flat surface at a constant velocity of 45 cm/sec. An oil film of unknown viscosity...
-
Mark plans to invest $5000 in a GIC for 4 years. He has a choice of 2 plans: Plan A: 6.75% compounded annually Plan B: 6.60% compounded quarterly In which plan should Mark invest? Explain.
-
A travel agency has recently lost several medium-sized and large corporate customers due to complaints about poor customer service. The management team of the travel agency decided to appoint a team...
-
Masbet Corporation has been a family owned company. While they are celebratingtheir 50th Anniversary the new generation of management wants to make somechanges in the way communication flows. Hence...
-
Use the quadratic formula to solve for x. 2 4x+9x+3=0
-
Imagine a conglomerate with three divisions. Division A's assets have a Beta of 0.5, Division B's assets have a Beta of 1.0, and Division C's assets have a Beta of 1.5. If the company uses the...
-
On March 1, 2020, Vision Tech Inc.'s board of directors declared a 15% share dividend when the market price per share was $8.00. On November 15, 2020, the board of directors declared a 4:1 share...
-
(a) With not more than 300 words, examine why Malaysia missed its 2020 targets to divert 40% of waste from landfills and increase recycling rates to 22%. (10 marks) b) Why arent Malaysian recycling?...
-
Write a method called reverse that reverses the order of the elements in the array list. For example, if a variable called list stores [11, 7, 3, 42, 0, 14, 56], the call of list.reverse(); should...
-
Given the ArrayList from problem 4, write code to print out the index at which your list contains the value "stormy" and the index at which it contains "dark". Do not use a loop. Data from Problem 4...
-
Write nested for loops to produce the following output: 1 22 333 4444 55555 666666 7777777
-
Find a news article or research report that describes (perhaps not explicitly) a hypothesis test for a population proportion. Attach the article and summarize the method used.
-
In a two-tailed hypothesis test of a claim about a proportion, the P-value is the area to the right of the standard score, z. Decide whether the statement makes sense (or is clearly true) or does not...
-
In conducting a hypothesis test as described in this section, which term best describes the particular distribution that is used: uniform, normal, probability, weighted?
Study smarter with the SolutionInn App