HL D Question 33 3 pts l have declared the following function: int findfirst(int
ID: 3576676 • Letter: H
Question
HL D Question 33 3 pts l have declared the following function: int findfirst(int a0C7)) return a[0200); Here is my main function: int main() int myarray[1] Cij 11); int first findfirstCimyarray) What is wrong? The first variable in main stores the return value of findfirst, which is an integer array, not an integer. The array is empty when the findfirst function is called. The array in main is not declared properly, It should be named a, not myarray. The array is too small for the findfirst function It must have 7 Time Ela Attempt du 1 Hour, 1Explanation / Answer
It would be option E i.e. "The array is too small for the findfirst function. It must have 7 columns."
Parameter of findfirst function is defined as int a[][7], which says that findfirst function accepts variables of type int (*)[7], but variable myarray is defined as int [1][1], which can be casted as int (*)[1] and not what is needed for findfirst.
Regarding other options:
Return value of findfirst is integer
Array has one element when findfirst is called
Array is declared properly, not necessarily have to be a
Number of rows doesnt matter to function, as it is not defined in parameter definition of function findfirst i.e. it is int a[][7]
Please comment, if something is not clear. I would be happy to help. :)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.