What is the ouput of the following program? #include using namespace std; int main() { int...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
What is the ouput of the following program? #include <iostream> using namespace std; int main() { int i, j,b; int x[4] [4]=(1,3,2,7, 2, 6,3,6,4,9,2,5,8,12, 3,8}; for(i=0; i<3; i++) { b=x[0][i]; x[0][i]-x [2][i]; x[2] [i]=b; } for(i=1; i<3; i++) { for(j=0; j<4; j++) cout<<x[i][j]<<",";} } What is the ouput of the following program? #include <iostream> using namespace std; int main() { int i, j,b; int x[4] [4]=(1,3,2,7, 2, 6,3,6,4,9,2,5,8,12, 3,8}; for(i=0; i<3; i++) { b=x[0][i]; x[0][i]-x [2][i]; x[2] [i]=b; } for(i=1; i<3; i++) { for(j=0; j<4; j++) cout<<x[i][j]<<",";} }
Expert Answer:
Answer rating: 100% (QA)
The given C program performs some array manipulations and then prints t... View the full answer
Related Book For
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
The EastCoasters Bicycle Shop stocks bikes; helmets; clothing; a variety of bike parts including chains, gears, tires, wheels; and biking accessories. The shop is in a storefront location on a busy...
-
31. Which combination of the compounds and their geometry are correct h) CIF, - V-shaped e) CIF, - Tshaped OB. a HeCl, - linoar 24. Which of the following havea bond angle smaller than tetrahodral...
-
A wheel on a game show is given an initial angular speed of 1.22 rad/s. It comes to rest after rotating through 0.75 of a turn. (a) Find the average torque exerted on the wheel given that it is a...
-
When x thousand dollars are spent on labor and y thousand on equipment, the output of a certain factory is Q units, where Suppose $120,000 is available for labor and equipment. a. How should the...
-
Estimate the energy that a runner expends to overcome aerodynamic drag while running a complete marathon race. This expenditure of energy is equivalent to climbing a hill of what height? List all...
-
Linda Filasky held policies issued by Preferred Risk Mutual Insurance Co. Following an injury in an automobile accident and storm damage to the roof of her home, Filasky sustained loss of income,...
-
II) (4 points) Consider the digital circuit shown in figure below. Write a Boolean equation (function) to compute the circuit's output M in terms of the circuit's inputs (i.e. M = f(x3, x2, x1, x 0,...
-
Marquis Westbury invested $19,100 in the Ternton and Rainwater partnership for ownership equity of $119,000. Prior to the investment, equipment was revalued to a market value of $77,400 from a book...
-
Which is the most appropriate equations for the vertical and horizontal asymptotes: 10- y 5- -4 -5+ -10- O Vertical asymptote: 1; horizontal asymptote: y = 0 4, %3D Vertical asymptotes: none;...
-
s.Convert the given histograms to a cumulative distribution function by dividing each bar with n, sample size. Draw the cumulative distribution functions (Hint: Area under the curve is equal to 1 in...
-
July 12 Sold merchandise to Wally Butler, who paid the $1,060 purchase with cash. The goods cost Evergreen Company $630. July 15 Sold merchandise to Claudio's Chair Company at a selling price of...
-
Compute the cost of equity and WACC . THE ANSWERS THAT ARE ON THE TABEL ARE WRONG. PLEASE SHOW FORMULAS IF EXCEL IS USED. To find the cost of equity in Question #3, you should use the MM Proposition...
-
Sandia corporation is considering two mutually exclusive projects. For our purposes, we will call them projects A and B. Project A is expected to cost $54,655, and project B is expected to cost...
-
Explore the concept of memory management in low-level programming languages like C and C++, discussing techniques such as manual memory allocation, automatic memory management, and the use of smart...
-
Emerging Technology Report Situation Overview: The Information Technology Strategic Planning Committee researches and guides the commitment of enterprise resources for the acquisition, integration,...
-
Name some of the various types of financial intermediaries described in the chapter and indicate the primary reason(s) each was created.
-
As you learned in the chapter, you must be careful when comparing two real numbers for either equality or inequality because some real numbers cannot be stored precisely in memory. To determine...
-
Complete the C++ instructions column in Figure 4-32. IPO chart information C++ instructions Input quantity sold item cost int quantity = 0; double cost = 0.0; double sellPrice item selling price =...
-
In most classes, you expose the _____________________ and hide the _____________________. a. Attributes, data members b. Data members, member methods c. Member methods, data members d. Variables,...
-
The trial balance for Oslo Co. on 31 July 20X7 is given below. The following additional information is relevant. 1. Closing inventory is valued at 180,000. 2. An allowance for doubtful debts is to be...
-
Find the heat transfer rate \(\mathrm{q}_{\mathrm{w}}\) at \(\mathrm{x}=10 \mathrm{~cm}\) and \(100 \mathrm{~cm}\) for the flat plate given in Problem 7.31. Problem 7.31 A flat plate of \(4...
-
Obtain the lift and propulsive force coefficients of an airfoil given in Example 8.6, and compare the results with Problem 8.30. Assume the profile pitches about midchord. Example 8.6 The NACA 0012...
Study smarter with the SolutionInn App