Question
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) / 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 ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended 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
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App