Answer:
10
Explanation:
An enqueue operation is a function that adds an element(value) to a queue array. A dequeue operations removes an element from a queue array. Queue arrays follow a first-in-first-out approach, so elements that are first stored in the queue are removed/accessed first(enqueue operations add elements at the rear of the queue array).
The following operations leave 10 elements in the queue of array size 12 after its done:
10 enqueue operations= adds 10 elements
5 dequeue operations= removes 5 elements( 5 elements left in queue)
6 enqueue operations= adds 6 elements(11 elements in queue)
10 dequeue operations= removes 10 elements(1 element left in queue)
8 enqueue operations= adds 8 elements(9 elements in queue)
2 dequeue operations= removes 2 elements(7 elements left in queue)
3 enqueue operations= adds 3 elements(10 elements in queue)
Therefore there are 10 elements in the queue after enqueue and dequeue operations.
I think the answer is
a
sorry if that is incorrect but i think that is the answer
A hand draw sketch is drawing with just a pencil and paper. also work drawing is a drawing on at a job. The 3D sketch is on the computer.
Answer:
#include <iostream>
using namespace std;
int main(){
int arr1[5], arr2[5], k = 7;
arr1 = {1,3,5,3,6}
arr2 = {1,3,2,4,4}
int reverseA2[5];
for (int x = 5; x > 0; x++){
reverseA2[5-x] = arr2[x-1];
}
for (int i = 0; i < 5; i++){
if ( arr1[i] + reverseA2[i] < k){
cout<< arr1[i] << " , "<<reverseA2[i];
}
}
}
Explanation:
The C++ source code prints a pair of values from the arr1 and reverse arr2 arrays whose sum is less than the value of the integer variable value k.