C code blocks Write the complete function that receives a pointer to a single floating point number as an argument and returns that number after subtracting 100 from it. Define your function in the same way as the given function prototype. Take a look at the "For example" below to see how the function is used in the main function and the expected result. (For interest sake, note that this is a pass-by-reference function call.) #include #include void subtractFunc(float *a);int main(){ float num = 357.900; subtractFunc(&num); printf("%.3f", num); return 0; } //Your answer starts here For example: Test Result float num = 357.900; subtractFunc(&num); printf("%.3f", num); 257.900
C code blocks Write the complete function that receives a pointer to a single floating point number as an argument and returns that number after subtracting 100 from it. Define your function in the same way as the given function prototype. Take a look at the "For example" below to see how the function is used in the main function and the expected result. (For interest sake, note that this is a pass-by-reference function call.) #include #include void subtractFunc(float *a);int main(){ float num = 357.900; subtractFunc(&num); printf("%.3f", num); return 0; } //Your answer starts here For example: Test Result float num = 357.900; subtractFunc(&num); printf("%.3f", num); 257.900
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 28SA
Related questions
Question
C code blocks
Write the complete function that receives a pointer to a single floating point number as an argument and returns that number after subtracting 100 from it.
Define your function in the same way as the given function prototype.
Take a look at the "For example" below to see how the function is used in the main function and the expected result.
(For interest sake, note that this is a pass-by-reference function call.)
#include <stdio.h>
#include <stdlib.h>void subtractFunc(float *a);int main(){ float num = 357.900;
subtractFunc(&num);
printf("%.3f", num); return 0;
}
#include <stdlib.h>void subtractFunc(float *a);int main(){ float num = 357.900;
subtractFunc(&num);
printf("%.3f", num); return 0;
}
//Your answer starts here
For example:
Test | Result |
---|---|
float num = 357.900; subtractFunc(&num); printf("%.3f", num); | 257.900 |
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning