Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

consider the given code and do the following: 1: int arr[10] =(-5, 10, -7,0); 2: int size = sizeof(arr) /

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(" "); 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(" "); Q1: Draw the Control Flowgraph of the following code. Q2: Demonstrates P1 and P2 coverage testing.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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 ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

College Mathematics for Business Economics Life Sciences and Social Sciences

Authors: Raymond A. Barnett, Michael R. Ziegler, Karl E. Byleen

12th edition

321614003, 978-0321614001

More Books

Students also viewed these Programming questions

Question

2. What is the focal length of a plane mirror? Explain.

Answered: 1 week ago