W310 6025 45 Consider the block of code and the function below then find the first two and last two values of the Array A after the function finishes its execution. The array and the variables are defined as integers. The user enters, s = 11, C = 3, and Array A = { 4, 9, -4, 7, 6, 34, 6, 11, -8, 0, 77 ); The function call is: Giraffe (A, S, C); // void Giraffe (int A[], int s, int N) 1 2 { int q, jx = 0; for (int ix = s - { q = A[ix]; A[ix] A[jx] = q; 1; jx < N; jx++) 7. = A[jx]; ix--; 11 12 }// end of function 13

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Consider the block of code and the function below then find the first two and last two values of the Array A after the function finishes its execution.
The array and the variables are defined as integers.
The user enters, s = 11, C = 3, and Array A = { 4, 9, -4, 7, 6, 34, 6, 11, -8, 0, 77 };
The function call is: Giraffe (A, S, C);
//
void Giraffe (int A[l, int s, int N)
{
int q, jx = 0;
for (int ix = s - 1; jx < N; jx++)
3.
q = A[ix];
A[ix] = A[jx];
A[jx] = q;
7.
10
ix--;
11
12
} // end of function
13
first two: (77, 0} last two: {9, 4})
Oa.
10:29 AM
Rain...
12/20/202
F4
F5
PrtScr
Insert
Home
End
F6
F7
F8
F9
F10
F11
Transcribed Image Text:Consider the block of code and the function below then find the first two and last two values of the Array A after the function finishes its execution. The array and the variables are defined as integers. The user enters, s = 11, C = 3, and Array A = { 4, 9, -4, 7, 6, 34, 6, 11, -8, 0, 77 }; The function call is: Giraffe (A, S, C); // void Giraffe (int A[l, int s, int N) { int q, jx = 0; for (int ix = s - 1; jx < N; jx++) 3. q = A[ix]; A[ix] = A[jx]; A[jx] = q; 7. 10 ix--; 11 12 } // end of function 13 first two: (77, 0} last two: {9, 4}) Oa. 10:29 AM Rain... 12/20/202 F4 F5 PrtScr Insert Home End F6 F7 F8 F9 F10 F11
first two: {77, 0} last two: {9, 4}
a.
first two: {4, 77} last two: {0, 9}
O b.
first two: {77, 4} last two:
{9, 0}
c.
first two: (9, 4} last two: {0, 77}
d.
first two: {4, 9} last two: {77, 0}
O e.
KA
F3
F4
F5
F6
F7
%23
%24
4
Transcribed Image Text:first two: {77, 0} last two: {9, 4} a. first two: {4, 77} last two: {0, 9} O b. first two: {77, 4} last two: {9, 0} c. first two: (9, 4} last two: {0, 77} d. first two: {4, 9} last two: {77, 0} O e. KA F3 F4 F5 F6 F7 %23 %24 4
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY