1. Given the following piece of code, provide the results of the printfs ()or as
ID: 3722146 • Letter: 1
Question
1. Given the following piece of code, provide the results of the printfs ()or assignment statements as requested. The blank comment indicates that you need to show the actual output of that printf on that line. Assume that the variables "resul" numberl", and "number2" have addresses of, 1885020, 1885032, and 1885044, respectively. The first line has been done for you. Each line is worth 2 points (yes, you receive 1 free pt ) include void integer multiplication tlat "res, int ·nual, int ·mm2); int main (void rinte "Result: ed, Numberl: d, Numbez2: dn", result, numberl, nb2 prints "Addresses of Result: d, Numberl: ld, Number2: dn".sresult snumberi. snunber2) /*blank 1. blank 2 blank 3 blank 4/ integer-"itipile.tian t uit.-t.tt. "aaptr" /"blank 5 blank 6 printt "Addresses of Results d, Numberl: td, Number2: dn", reault, snumbezl Snunber2) printf "Results d, Numberl: d, Numbes2: dn"result, mumberl, ubes2) return void integer-multiplication {int res, int "num, int .n) /"blank 7 printf "Res: d, Numi: d, Num2s d" rs, mumi, m2 res-uml m2 blank nt Result of multiplying d by d isni2 Answers: blank 1 Result: 0, Numberl: 5, Number2:9 blank 2 blank 3 blank 4 What is the actual contents of num2 ptr? blank 5 blank 6 blank 7 blank 8Explanation / Answer
GIVEN
result0 num1= 5 num2 = 9 *num1_ptr=NULL *num2_ptr=NULL
ADDRESSES : result = 1885020 num1 = 1885032 num2 = 1885044
Blanks
2. Addresses of result :1885020 , Number1: 1885032 ,Number2: 1885044
3. num1_ptr-> 1885032
4. num2_ptr-> 1885044
5. Addresses of result :45 , Number1: 5 ,Number2: 9
6.result :1885020 , Number1: 1885032 ,Number2: 1885044
7.Res: 1885020, Num1:1885032 , Num2:1885044
8.Result after multiplying ,5,9,45
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.