18 18 Thu 27 Jun 20 21 } fclose(fpIn); fclose(fpOut); return(ol..... EXAMPLE (6 points) Given the following code: 1 #include 2 3 Void.. change(...!" int* ..vet, int n) 4 { 5 int i; 6 7 for (i=0; i { 12 13 14 15 16 int main() int i, a[]{2, 4, 6, 8, 10}; change(a, 5); for (i=0; i<5; i++) printf("%d ",a[i]); return 0; 17 } 18 19 ract TE 1) Complete the header of the function change at line 3: 2) What would the output of the program be? 2 15 6 8 10 3) How would you change line 7, so that the new output of the program is: 7 9 11 13 15? *(vet + i) = *(vet + i)+5; EXAMPLE (6 points) 69%

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Could you please explain how I can interpret the code by reading it and doing the calculations in order to find out the output of the code (This is a C code)
18
18 Thu 27 Jun
20
21
}
fclose(fpIn); fclose(fpOut);
return(ol.....
EXAMPLE (6 points)
Given the following code:
1 #include <stdio.h>
2
3
Void.. change(...!"
int*
..vet, int n)
4
{
5
int i;
6
7
for (i=0; i<n; i++)
*(vet + 1) = *(vet + i) + 5%;
8
}
9
10
11->
{
12
13
14
15
16
int main()
int i, a[]{2, 4, 6, 8, 10};
change(a, 5);
for (i=0; i<5; i++)
printf("%d ",a[i]);
return 0;
17
}
18
19
ract
TE
1) Complete the header of the function change at line 3:
2) What would the output of the program be?
2 15 6 8 10
3) How would you change line 7, so that the new output of the program is: 7 9 11 13 15?
*(vet + i) = *(vet + i)+5;
EXAMPLE (6 points)
69%
Transcribed Image Text:18 18 Thu 27 Jun 20 21 } fclose(fpIn); fclose(fpOut); return(ol..... EXAMPLE (6 points) Given the following code: 1 #include <stdio.h> 2 3 Void.. change(...!" int* ..vet, int n) 4 { 5 int i; 6 7 for (i=0; i<n; i++) *(vet + 1) = *(vet + i) + 5%; 8 } 9 10 11-> { 12 13 14 15 16 int main() int i, a[]{2, 4, 6, 8, 10}; change(a, 5); for (i=0; i<5; i++) printf("%d ",a[i]); return 0; 17 } 18 19 ract TE 1) Complete the header of the function change at line 3: 2) What would the output of the program be? 2 15 6 8 10 3) How would you change line 7, so that the new output of the program is: 7 9 11 13 15? *(vet + i) = *(vet + i)+5; EXAMPLE (6 points) 69%
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education