Answer:
Explanation:
The following code is written in Java it goes through the queue that was passed as an argument, loops through it and removes all the odd numbers, leaving only the even numbers in the queue. It does not add any more data structures and finally returns the modified queue when its done.
public static Queue<Integer> evens(Queue<Integer> queue) {
int size = queue.size();
for(int x = 1; x < size+1; x++) {
if ((queue.peek() % 2) == 0) {
queue.add(queue.peek());
queue.remove();
} else queue.remove();
}
return queue;
}
I guess the correct option is letter D.
C:\windows\system32\drivers\etc\protocol is an example of a file path.
Option D is correct.
Explanation :
- In option A, it is not mandatory that a function will have arguments and it will return a value.
- In option B, no formula begins with =.
- In option C, it is not necessary to begin with /.
- In option D, MAX function should return maximum value in the set given.
Thus, option D is correct because arguments of a function are always enclosed within parentheses
Example:
SUM (30,70)
Answer:
in my opinion i think it is "C" by clicking on the run button...