1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
iogann1982 [59]
3 years ago
13

Assume you are using the text's array-based queue and have just instantiated a queue of capacity 10. You enqueue 5 elements and

then deque elements. Which indices of the internal array elements hold the remaining elements? a) 0 to 2 b) 7 to 9 c) 2 to 4 d) 1 to 3
Computers and Technology
1 answer:
Anika [276]3 years ago
7 0

Full question:

Assume you are using the text's array-based queue and have just instantiated a queue of capacity 10. You enqueue 5 elements and then deque 2 elements. Which indices of the internal array elements hold the remaining elements? a) 0 to 2 b) 7 to 9 c) 2 to 4 d) 1 to 3

Answer and Explanation:

If you instantiate a capacity of 10 for the queue, you have the queue a capacity of not more than 10 values.

To enqueue means to add an element to the array(if it's not full, n<10)

To dequeue means to delete an element from the array or queue(if n! =0)

From the question, for example:

We create a queue of capacity 10:

Queue q(10);

We add elements/enqueue 5 elements to the queue :

q.queueEnqueue(10);

q.queueEnqueue(5);

q.queueEnqueue(8);

q.queueEnqueue(9);

q.queueEnqueue(2);

If we print this out:

q. queueDisplay()

We would get:

10, 5, 8, 9, 2

We remove elements/dequeue 2 elements from the queue :

q. queuedequeue();

q. queuedequeue();

We print it out:

q. queueDisplay()

8 ,9, 2

We observe that deletion/dequeue starts from the front/first index.

We are left with indices 2, 3, 4 or 2 to 4

Note: the above methods/ functions and objects used are merely for example purposes. The queue uses a floating front design approach.

You might be interested in
Select the correct answer from each drop-down menu.
mihalych1998 [28]

Answer:

i dont know

Explanation:

they block every thing for smoe reason

3 0
3 years ago
A company's computers monitor assembly lines and equipment using ________ communications.
mr_godi [17]

Answer:

Machine to machine communications

Explanation:

Machine to machine communication is a type of communication that exists among the technical devices. The communication is linked either with the help of wire or through wireless. The information is communicated and transmitted with this form of communication. Human involvement or intervention is not required during the transfer of data.

6 0
4 years ago
In addition to meeting OSHA standards, the Department of Defense requires each military department, including the Department of
professor190 [17]
The correct answer is: DoD Instruction 6055.1 which is known as DoD Occupational Safety and Health Program.

<span>In addition to meeting OSHA standards, the Department of Defense requires each military department, including the Department of the Army, to administer a comprehensive safety and occupational health program. The requirement appears in this document.</span>
3 0
3 years ago
Design pseudocode for a program that will permit a user to store exactly 50 numbers in an array. Create an array big enough to h
galben [10]

Answer:

#include<stdio.h>

//declare a named constant

#define MAX 50

int main()

{

   //declare the array

   int a[MAX],i;

   //for loop to access the elements from user

   for(i=0;i<MAX;i++)

   {

      printf("\n Enter a number to a[%d]",i+1);

      scanf("%d",&a[i]);

  }

  //display the input elements

  printf("\n The array elements are :");

  for(i=0;i<=MAX;i++)

  printf(" %d ",a[i]);

}

Explanation:

PSEUDOCODE INPUTARRAY(A[MAX])

REPEAT FOR I EQUALS TO 1 TO MAX

PRINT “Enter a number to A[I]”

READ A[I]

[END OF LOOP]

REPEAT FOR I EQUALS TO 1 TO MAX

PRINT A[I]

[END OF LOOP]

RETURN

ALGORITHM

ALGORITHM PRINTARRAY(A[MAX])

REPEAT FOR I<=1 TO MAX

PRINT “Enter a number”

INPUT A[I]

[END OF LOOP]

REPEAT FOR I<=1 TO MAX

PRINT A[I]

[END OF LOOP]

6 0
3 years ago
I'm doing a python assignment for my coding class, and the input part just isn't working, someone please help out and tell me wh
tigry1 [53]

,.....,.........mm malds quería saber

8 0
2 years ago
Other questions:
  • Show what this program prints. Be exact and complete. Can you explain the behavior of each print statement? 1 2 3 4 5 6 7 public
    12·1 answer
  • This type of software can be described as end user software and is used to accomplish a variety of tasks. communications system
    15·1 answer
  • The part of the computer that provides access to the internet is the
    10·1 answer
  • When completing an application what color ink do you use
    8·2 answers
  • How does knowing the player type you are impact your game designing?
    6·1 answer
  • List the five body functions that monitor homeostasis.
    7·1 answer
  • Heather is troubleshooting a computer at her worksite. She has interviewed the computer’s user and is currently trying to reprod
    12·1 answer
  • 1. It is a set of integrated devices that input, output,
    11·1 answer
  • Assembly language program wich indetify largest number from the five elements 51,44,67,30,99​
    13·1 answer
  • Can somebody please help me with these few questions?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!