Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

below are the options for this question Question 6 (3 points) #include 10. int afunc (int *a, int *b) { 11 *a++; 12 *b++; 13

image text in transcribed
below are the options for this question
image text in transcribed
Question 6 (3 points) #include 10. int afunc (int *a, int *b) { 11 *a++; 12 *b++; 13 return (a b); } 14 15 - int main (void) { 16 int x = 9, y = 10; 17 int r = afunc (&x, &y); 18 printf ("%d %d", x, y); 19 return 0; } 20 Select the most appropriate choice that correctly explains output of the above code. Select the most appropriate choice that correctly explains output of the above code. Since the function prototype forces arguments to be passed by value, it will display unchanged values of x and y. Though the function prototype forces arguments to be passed by reference, the call of the function is incorrectly passing values of variables and therefore it will display unchanged values of x and y Both the function prototype and the call are correctly enforcing pass by reference and therefore, it will display x and y values updated i.e. increased by 1. Though function prototype and the call are correctly enforcing call by reference: however, in the body of the function indirection operator was not correctly used to access value of the variables and therefore, it will display unchanged values of x and y. None of these

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

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions