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
Olegator [25]
2 years ago
9

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 dequeue 2 elements. Which indices of the internal array elements hold the remaining elements
Computers and Technology
1 answer:
ASHA 777 [7]2 years ago
3 0

The indices of the internal array elements that hold the remaining elements is c) 2 to 4

<h3>Calculations and Parameters:</h3>

For us to create a capacity of 10 for the queue, we would enqueue:

We would create a queue of capacity 10:

<h3>Queue q(10);</h3>

We add elements/enqueue 5 elements to the queue :

  • q.queueEnqueue(10);
  • q.queueEnqueue(5);
  • q.queueEnqueue(8);
  • q.queueEnqueue(9);
  • q.queueEnqueue(2);

Printing this would give:

q. queueDisplay()

10, 5, 8, 9, 2

Next, we would remove elements/dequeue 2 elements from the queue :

q. queuedequeue();

q. queuedequeue();

Printing it would be:

q. queueDisplay()

8 ,9, 2

Observing this, the deletion/dequeue starts from the front/first index.

The remaining indices of the internal array elements are: 2, 3, 4 or 2 to 4

Read more about arrays and enqueue here:

brainly.com/question/24188935

#SPJ1

You might be interested in
Which of the following is used to describe the information used in
aniked [119]

Answer:

D.

Explanation:

Clipher

You can read the instructions

3 0
2 years ago
1.Know the BMI of the user. First, the user will input the height in meters and weight in kilograms. After inputting, the inputt
Verizon [17]

The program that checks the BMI of a patient is given below:

<h3>THE CODE</h3>

#include <iomanip>

#include <iostream>

#include <math.h>

using namespace std;

// C++ program to illustrate

// how to calculate BMI

float BMI(float height, float weight)

{

   float bmi = weight / pow(height, 2);

   return bmi;

}

int main()

{

   float height = 1.79832;

   float weight = 70;

   // Function call

  float bmi = BMI(height, weight);

   cout << "The BMI is " << setprecision(15) << bmi

        << " so ";

   // Conditions to find out BMI category

   if (bmi < 18.5)

       cout << "underweight";

   else if (bmi >= 18.5 && bmi < 24.9)

       cout << "Healthy";

   else if (bmi >= 24.9 && bmi < 30)

       cout << "overweight";

   else if (bmi >= 30)

       cout << "Suffering from Obesity";

   return 0;

}

// This code is contributed by aarohirai2616.

<h3>Output: </h3>

The BMI is 21.64532402096181 so Healthy

Read more about algorithms here:

brainly.com/question/24953880
#SPJ1

3 0
1 year ago
1. Fill in the blanks:
Anit [1.1K]

Answer:

<h2>a) computer software </h2>

<h2>b) flash drive</h2>

<h2>c) Latin "putare" </h2>

<h2>d) Hardware</h2>

<h2>e) software</h2>

hope it's helpful ✌

8 0
3 years ago
A _____ cloud allows an organization to take advantage of the scalability and cost-effectiveness that a public cloud computing e
balu736 [363]

Answer:

Hybrid

Explanation:

Hybrid cloud is a solution that combines a private cloud with one or more public cloud services, with proprietary software enabling communication between each distinct service.

5 0
3 years ago
Is a storyboard an example of an implemation tool?
goblinko [34]
Yes, the answer is true.
8 0
3 years ago
Read 2 more answers
Other questions:
  • What is the other name of the horizontal column graph?
    6·2 answers
  • To change to the completed application’s directory, we opened a command window and used the ________ command to change to the di
    7·1 answer
  • What was one of the first inventions that made it possible to communicate almost instantly?
    11·1 answer
  • Why is statistics important?
    6·1 answer
  • An anagram is a word or a phrase made by transposing the letters of another word or phrase; for example, "parliament" is an anag
    7·1 answer
  • Which clauses in the Software Engineering Code of Ethics are upheld by a whistleblower (check all that apply). "Respect confiden
    15·1 answer
  • Write a computer program that computes the duration of a projectile’s flight and its height above the ground when it reaches the
    11·1 answer
  • Does white space have visual weight? Yes or No
    7·2 answers
  • Which category does this fall in identity theft​
    6·1 answer
  • A drive is small enough to be carried in one's pocket.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!