Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C programming language : 1. Given the following piece of code, provide the results of the printfs () or assignment statements as requested or

Using C programming language :

image text in transcribed

1. Given the following piece of code, provide the results of the printfs () or assignment statements as requested or fill in the appropriate missing statement. The /*blank/ comment indicates that you need to show the actual output of that printf ), contents of the variable, or supply the missing statement on that line. Assume that the variables "result", "number 1", and "number2" have addresses: 48888888, 48888896, and 48888904, respectively. The first line has been done for you. Each line is worth 2 points, except for blank 7*, which is 3 pts. #include void integer_division (int *res, int *numl, int *num2) int main (void) int result = 0, number1 5, number2 = 77, *num1-ptr= NULL, *num2_pt r= NULL ; /*blank 1/ /*blank 2/ printf ("Result: ("Addresses %d, Number1: Result: %d, %d, Number2: Number1 : %d ", %d, result, number1, %d ", number2); printf of Number2 : &result, &number1, &number2); /*blank 3/ num1 ptr = &number1; num2_ptr&number2; integer_division (&result, numl_ptr, &number2) printf ("Addresses of Result: %d, Number1 : %d, /*blank 4/ /*blank 5/ Number2: %d ", &result, &number1, &number2); printf ("Result: %d, Number1 : %d, Number2 : %d ", result, number1, number2); return 0; // This function divides the indirect value of numl by the indirect value of num2, and stores // the result into the indirect value of res. void integer_division (int *res, int *numl, int *num2) /*blank 6/ /*blank 7/ /*blank 8* Answers: *blank 1 Result: 0 Numberl: 5.Number2: 77 /*blank 2* /*blank 3What is the actual contents or direct value of numl ptr? /*blank 4*/ /*blank 5*/ *blank 6*/ /*blank 7/ (3 pts) /*blank 8* printf ("Res : %d, Nun1 : %d, Num2 : %d ", res, num1, num2); // fill in missing statement printf ("Result of dividing %d by %d is %d ", *num1, *num2, *res)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What rights does the city management have in this case?

Answered: 1 week ago