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
-
A sailing ship stopped at several islands, releasing one matingpair of goats onto each one. On the large island, the goats\' growthrate was approximately exponential for a long time. If their per...
-
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...
-
As of December 31 of the current year, Petersen Corporation has prepared the following information regarding its liabilities and other obligations: Notes payable, of which $12,000 will be repaid...
-
The following are the balance sheets of Farrell Corporation as of December 31, 2007 and 2006, and the statement of income and retained earnings for the year ended December 31, 2007: Additional...
-
Use your calculator to calculate 38 - 100. Explain how the answer agrees with what was expected.
-
Using the financial information in the following tables, compute the required ratios list on the ratio analysis sheet and then complete the horizontal and vertical analyses worksheets. Income...
-
can you please help me? In practice, a common way to value a share of stock when a company pays dividends is to value the dividends over the next five years or so, then find the "terminal" s...
-
Presented below are annual coupon rates, yield rates, and expected duration for a series of debentures. Calculate the issuance price for each debenture assuming that the face value of each bond is...
-
Q2: A generalization of the Caesar cipher, knows as the affine Caesar cipher, has the following form: For each plaintext letter p, substitute the ciphertext letter C: C= E([a, bl, p) = (a.p + b) mod...
-
A 16.0 cm diameter coil consists of 29 turns of cylindrical copper wire 3.20 mm in diameter. A uniform magnetic field, perpendicular to the plane of the coil, changes at a rate of 8.00 10 -3 T/s....
-
What is the difference between opportunistic Behavior and relationship Behavior?
-
In your own opinion, what makes the filed of Applied Behavior Analysis different from other approaches to understanding and changing human behavior?
-
A dart is thrown horizontally with an initial speed of 11.39m/s towards a dartboard that is horizontal distance of 2.52 m from the position of the dart when it is released. What vertical distance in...
-
A bond with a coupon rate of 12 percent sells at a yield to maturity of 14 percent. If the bond matures in 12 years, what is the Macaulay duration of the bond? What is the modified duration?
-
De Jaegher and Di Paolo (2007, 2008) develop a framework for understanding social cognition as participatory sense-making, building on the biology of cognition developed by Maturana and Varela and...
-
San Carlos Bank and Trust Company uses a credit-scoring system to evaluate most consumer loans that amount to more than $2,500. The key factors used in its scoring system are found at the conclusion...
-
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,...
-
12. ROLE REVERSAL: Write a multiple-choice question that raises the issue of an instrument's negotiability.
-
Question: Winona owns a tropical fish store. To buy a spectacular new tank, she borrows $25,000 from her sister, Pauline, and signs an agreement giving Pauline a security interest in the tank....
-
Consider the set of vectors \((-1,1,1),(1,-1,1),(1,1,-1)\). a. Use the Gram-Schmidt process to find an orthonormal basis for \(R^{3}\) using this set in the given order. b. What do you get if you do...
Study smarter with the SolutionInn App