Answer:
D. have function return the whole array
Step-by-step explanation:
the given function only return first occurrence of target. In order to get all occurrences of target we have to change condition in while loop to check whole array even if first occurrence of target found and plus add another parameter of type array that will store different indexes of occurrence of target and return that array