Ask Question
16 November, 12:34

Which of the following function declarations correctly expect an array as the first argument?

Question 1 options:

void f1 (int array, int size);

void f1 (int& array, int size);

void f1 (int array[100], int size);

void f1 (float array[], int size);

All of the above

C and D

A and B

+4
Answers (1)
  1. 16 November, 13:28
    0
    Only

    Option: void f1 (float array[], int size);

    is valid.

    Explanation:

    To pass an array as argument in a function, the syntax should be as follows:

    functionName (type arrayName[ ])

    We can't place the size of the array inside the array bracket (arrayName[100]) as this will give a syntax error. The empty bracket [] is required to tell the program that the value that passed as the argument is an array and differentiate it from other type of value.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Which of the following function declarations correctly expect an array as the first argument? Question 1 options: void f1 (int array, int ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers