Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help me do these questions. Thank you so much Code Tracing and Inspection art 1: Test and Observe #include void func_02 (int *num2) 1- void

Help me do these questions. Thank you so muchimage text in transcribed

image text in transcribed

Code Tracing and Inspection art 1: Test and Observe #include void func_02 (int *num2) 1- void func 01(int *num1) (*num2)(*num2) -1; func-02 (num1) ; 1- int main(O int num10; func-01 (&num) ; printf("new num return e; i is %d", num); bu Read the above code carefully and try to answer the following questions? Q1.1) what do you think the code will print when we execute it and why: A. It will not run and it will generate a compilation error B. It will print a random value for num C. It will print new num is 10 D. It will print new num is 9 E. It will print new num is 8 Now, Compile and run the code, now was your answer correct?v Q1.2) Edit the code to remove the & character from the main when we call func 01(&num) to it wil be func_01 (num). Compile and run your code, what is the result, why? Q1.3) According to func_02(int "num2) prototype we should pass to it an argument by reference on by a pointer. However, when we call it inside func 01 we do not use the & character as we did in the main with func_01(&num). Why do you think we did that

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

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions