consider the given code and do the following: 1: int arr[10] = (-5, 10, -7,0); 2:...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
consider the given code and do the following: 1: int arr[10] = (-5, 10, -7,0); 2: int size= sizeof(arr) / sizeof(arr[0]); 3: printf("Original array: "); 4: for (int i= 0; i < size; i++) { 5: printf("%d", arr[i]); 6: } 7: printf("\n"); 8: for (int i = 0; i < size; i++) { 9: if (arr[i] < 0) arr[i] = -arr[i]; 10: 11: } 12: printf("Absolute value array: "); 13: for (int i=0; i < size; i++) { 14: printf("%d", arr[i]); 15: } 16: printf("\n"); Q1: Draw the Control Flowgraph of the following code. Q2: Demonstrates P1 and P2 coverage testing. consider the given code and do the following: 1: int arr[10] = (-5, 10, -7,0); 2: int size= sizeof(arr) / sizeof(arr[0]); 3: printf("Original array: "); 4: for (int i= 0; i < size; i++) { 5: printf("%d", arr[i]); 6: } 7: printf("\n"); 8: for (int i = 0; i < size; i++) { 9: if (arr[i] < 0) arr[i] = -arr[i]; 10: 11: } 12: printf("Absolute value array: "); 13: for (int i=0; i < size; i++) { 14: printf("%d", arr[i]); 15: } 16: printf("\n"); Q1: Draw the Control Flowgraph of the following code. Q2: Demonstrates P1 and P2 coverage testing.
Expert Answer:
Answer rating: 100% (QA)
v 3 printfOriginal array 4 for int i 0 i size i 5 printfd arri v 7 printf v 8 for int i 0 i size i 9 ... View the full answer
Related Book For
College Mathematics for Business Economics Life Sciences and Social Sciences
ISBN: 978-0321614001
12th edition
Authors: Raymond A. Barnett, Michael R. Ziegler, Karl E. Byleen
Posted Date:
Students also viewed these programming questions
-
The following diagram is a sketch of a 16-in. ruler marked using 12 inches. without using a calculator, indicate between which two adjacent ruler marks each of the following irrational numbers will...
-
Boxes A and B are at rest on a conveyor belt that is initially at rest. The belt is suddenly started in an upward direction so that slipping occurs between the belt and the boxes. Knowing that the...
-
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...
-
In Exercises explain why Rolle's Theorem does not apply to the function even though there exist a and b such that (a) = (b). f(x) H [1,1]
-
Complete this table for H2O: T, C 140 v, m3/kg 0.05 P kPa Phase description Saturated liquid 125 500 750 0.140
-
(a) The following is the Receipts and Payments Account of Mumbai Club for the year ended March 31, 2021: Receipts Receipt and Payment Account of Mumbai Club Amount Payments () 20,000 Cash in hand...
-
Some of the prior interviews suggest that the company is so cheap that they wont pay people what they are worth. Have you had similar experiences?
-
Jim Campbell is founder and CEO of Open-Start, an innovative software company. The company is all equity financed, with 100 million shares outstanding. The shares are trading at a price of $1....
-
A single nuclear reactor produces 2.6GW of electrical power, and has a generator voltage of 22kV.What percentage of power would be lost from our nuclear reactor in three-line transmission that goes...
-
Suppose that Sasha and Jayla both collect data to investigate whether people tend to call heads more often than tails when they are asked to call the result of a coin flip. If Sasha has a smaller...
-
For businesses facing complex and turbulent businessenvironments, which of the following is true? Goals and objectives that are uncertain preventopportunism Traditional strategic controls are usually...
-
My Custom Shop, Inc., (MCS) bought an 18-year-old Ford Ranger truck with 178,000 miles at auction for about $1,300. MCS made several improvements to the vehicle and then sold it to Seth Kiewiz for...
-
How does negligence-based product liability differ from strict product liability?
-
Fine Textiles, Inc., sells cloth to Gail by showing her a sample that Fines salesperson says is the same as the goods. This statement is a. an express warranty. b. an implied warranty. c. a warranty...
-
Eagle Equipment sells motor vehicle parts to dealers. In response to a dealers order, Eagle ships a crate with a label that reads, Crate contains one 150-horsepower diesel engine. This statement is...
-
B&B Sales, Inc., sells drones. A B&B salesperson claims, This is the finest drone ever made. This statement is a. an express warranty. b. an implied warranty of merchantability. c. an implied...
-
Arun and Amit begin together writing out a booklet containing 8190 line. Arun starts with the first line, writing at the speed of 200 lines an hour; and Amit starts with the last line, then writes...
-
A Bloomberg Businessweek subscriber study asked, In the past 12 months, when traveling for business, what type of airline ticket did you purchase most often? A second question asked if the type of...
-
In Problem, determine whether f is differentiable at x = 0 by considering f(x) = 1 - |x| f(0 + h) f(0) lim h-+0
-
In Problem, use the price-demand equation to find the values of p for which demand is elastic and the values for which demand is inelastic. Assume that price and demand are both positive. x = f(p) =...
-
In Problem, use the given information to complete the following table. n(A')=81, n(B')=90, n(A'©B')=63, n(U)= 180 A' Totals 1 Totals
-
What communication and HR practices does New Belgium use to keep employees in the loop so they feel involved with the company and part of a community? Kim Jordan and Jeff Lebesch, the husband and...
-
What do you consider to be the primary opportunities related to the issue of illegal immigrants in the workforce? State your reasoning. Illegal immigrant labor is a global HRM issue that arises from...
-
What do you consider to be the main challenges related to the issue of illegal immigrants in the workforce? State your reasoning. Illegal immigrant labor is a global HRM issue that arises from people...
Study smarter with the SolutionInn App