main.c > + c Input 1 #include 3 - int main(void) { int a, b; 1. First integer 4 2. Second integer printf("Enter integer 1: "); scanf("%d", &a); 6. Output 8 9 10 11 12 13 14 15 16 17 printf("Enter integer 2: "); scanf("%d", &b); Enter integer 1: 10 Enter integer 2: 20 exchangeGi ft(&a, &b); 20 110 printf("%d %d", a, b); return 0;
(C PROGRAMMING ONLY)
4. Special Exchanging Gifts
by CodeChum Admin
It's Christmas time and we're having this exchanging gifts activity!
I want to surprise the receiver of my gift. After he/she receives my gift, I will add an additional P100 bill!
Instructions:
In the code editor, you are provided with a main() function that asks the user for 2 integers. Then, a function call to a function named, exchangeGift() is made and the addresses of the 2 integers are passed.
This exchangeGift() function hasn't been implemented yet so this is your task. This has the following description:
Return type - void
Name - exchangeGift
Parameters - 2 addresses of 2 integers
Description - swaps the value of the 2 integers and then adds 100 to the 2nd integer (or 2nd parameter)
DO NOT EDIT THE MAIN
Input
1. First integer
2. Second integer
Output
Enter·integer·1:·10
Enter·integer·2:·20
20·110
![main.c
< > +C
Input
1 #include<stdio.h>
1. First integer
3- int main(void) {
4
int a, b;
2. Second integer
printf("Enter integer 1: ");
scanf("%d", &a);
7
Output
8
printf("Enter integer 2: ");
scanf("%d", &b);
10
11
12
13
14
15
16
Enter integer 1: 10
Enter integer 2: 20
exchangeGi ft(&a, &b);
20 110
printf("%d %d", a, b);
return 0;
17 H](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fbe8a4ed4-17ea-4cb9-b5d2-d7d40c41b1cc%2Ffdd7d433-de13-4eab-aee2-58dadc9f31a1%2Fqsov1te_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)