Question: Question 1 What is the correct syntax to pass an integer array arr of size n to a function name modifyArray? a ) void modifyArray

Question 1
What is the correct syntax to pass an integer array arr of size n to a function name modifyArray?
a) void modifyArray(int arr[n]);
b) void modifyArray(int *arr);
c) void modifyArray(int arr[]);
d) All of the above
Question 2
Which of the following statements is true about passing arrays to functions in C ?
a) An array cannot be passed to a function in C .
b) An array is passed by value to a function.
c) An array is passed by reference to a function.
d) An array is passed as a pointer to the first element.
Question 3
Given the function void updateArray(int arr[], int size); which of the following statements correctly calls updateArray from main with an integer array myArray of size 10?
a) updateArray(myArray[]);
b) updateArray(\&myArray, 10);
c) updateArray(*\({}^{*}\) yyArray, 10);
d) updateArray(myArray,10);
Question 1 What is the correct syntax to pass an

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 Programming Questions!