Question
write the program in c Directions: Write fully executable code when answering each question. NOTE: You do NOT need to display any results for this
write the program in c
Directions: Write fully executable code when answering each question.
NOTE: You do NOT need to display any results for this function.
Here is the function prototype for the function CalculateStuff that takes 2 integers and 2 integer pointer arguments and returns nothing.
void CalculateStuff(int arg1, int arg2, int *squarePtr, int *prodPtr);
Write the main function with a function call to CalculateStuff use integer variables input1, input2, (address of) squared, and (address of)product. Declare the variables and assign values. Print squared and product onto the screen in one printf statement.
Write the function definition for CalculateStuff. The function will store the sqaure of the value of the first integer argument (arg1) in the "value at" the first pointer argument (squarePtr) and the product of the first two integer variables (arg1 and arg2) in the "value at" the second pointer argument(prodPtr). You should not need any other variables in the function.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started