(C PROGRAMMING ONLY) 1. Pointing Fingers by CodeChum Admin I am so mad at my brothers, they always point their fingers to me whenever mom gets angry ? Now that I'm knowledgeable about pointers, I'm going to point all of my 5 fingers to them. Let's see who's tough now! Instructions: In the code editor, you are provided with a main() function where the user is asked for 5 double numbers. Then, in lines 19 - 23, your task is to set the addresses of these numbers to each of the pointers. The address of the first number, a, should be assigned to the first pointer, the address of the second number, b, should be assigned to the second pointer, and so on. Input 1. First number 2. Second number 3. Third number 4. Fourth number 5. Fifth number Output Enter 1st number: 23.2 Enter 2nd number: 10.01 Enter 3rd number: 800 Enter4th number: 24 Enter 5th number: 21 23.2 10.0 800.0 24.0 21.0
(C
1. Pointing Fingers
by CodeChum Admin
I am so mad at my brothers, they always point their fingers to me whenever mom gets angry ?
Now that I'm knowledgeable about pointers, I'm going to point all of my 5 fingers to them. Let's see who's tough now!
Instructions:
In the code editor, you are provided with a main() function where the user is asked for 5 double numbers.
Then, in lines 19 - 23, your task is to set the addresses of these numbers to each of the pointers. The address of the first number, a, should be assigned to the first pointer, the address of the second number, b, should be assigned to the second pointer, and so on.
Input
1. First number
2. Second number
3. Third number
4. Fourth number
5. Fifth number
Output
Enter 1st number: 23.2
Enter 2nd number: 10.01
Enter 3rd number: 800
Enter4th number: 24
Enter 5th number: 21
23.2 10.0 800.0 24.0 21.0
![main.c
< > +C
scanf("%Lf", &b);
printf("Enter 3rd number: ");
scanf("%Lf", &c);
printf("Enter 4th number: ");
scanf("%lf", &d);
printf("Enter 5th number: ");
scanf("%lf", &e);
10
11
12
13
14
15
16
17
// TODO: Fill in the blanks
ptr1
ptr2
ptr3
ptr4
ptr5
18
19
20
21
22
23
24
25 -
printf(
"%. 1lf %.1lf %.1lf %.1lf %.1lf",
*ptr1, *ptr2, *ptr3,
26
27
*ptr4, *ptr5
28
);
29
30
return 0;
|||||
I| || || ||I](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fd46b6080-59ac-43dd-a083-17cb326bb723%2F4cac6d38-f625-4caa-8262-dc884f375efe%2Fzi1xjgp_processed.jpeg&w=3840&q=75)
![main.c
4. Fourth number
1 #include<stdio.h>
5. Fifth number
3 - int main(void) {
double a, b, c, d, e;
double *ptr1, *ptr2, *ptr3, *ptr4, *ptr5;
4
Output
printf("Enter 1st number: ");
scanf("%Lf", &a);
printf("Enter 2nd number: ");
scanf("%Lf", &b);
printf("Enter 3rd number: ");
scanf("%lf", &c);
printf("Enter 4th number: ");
scanf("%lf", &d);
printf("Enter 5th number: ");
scanf("%lf", &e);
7
Enter 1st number: 23.2
8
9.
Enter 2nd number: 10.01
10
Enter 3rd - number: 800
11
Enter 4th number: 24
12
Enter 5th number: 21
13
23.2 10.0 800.0 24.0- 21.0
14
15
16
17
// TODO: Fill in the blanks
ptr1
18
19](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fd46b6080-59ac-43dd-a083-17cb326bb723%2F4cac6d38-f625-4caa-8262-dc884f375efe%2Feld7xkn_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 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)