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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!