To compare two arrays, we can use
a) Comparison operator ‘==’ directly on arrays
b) “switch case” statement
c) “for” loop
d) ternary operator on arrays
Answers
Answered by
0
Answer:
"for" loop is the answer
Answered by
0
Option (c) "for" loop is the correct answer.
- We can use a for loop to compare the given two arrays.
- Iterate in both of the arrays and compare if one element is present in the second array.
Example code (Python3):
Output:
#SPJ3
Similar questions