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
Dmitry [639]
3 years ago
13

Suppose that a client performs an intermixed sequence of (queue) enqueue and dequeue operations. The enqueue operations put the

integers 0 through 9 in order onto the queue; the dequeue operations print out the return value. Which of the following sequence(s) could not occur? a. 0 1 2 3 4 5 6 7 8 9 b. 4 6 8 7 5 3 2 9 0 1c. 2 5 6 7 4 8 9 3 1 0
d. 4 3 2 1 0 5 6 7 8 9
Computers and Technology
1 answer:
earnstyle [38]3 years ago
8 0

Answer:

b, c and d can't occur.

Explanation:

Order is preserved in queue. Option A is order preserving so only it will occur.

You might be interested in
Input 3 positive integers from the terminal, determine if tlrey are valid sides of a triangle. If the sides do form a valid tria
butalik [34]

Answer:

In Python:

side1 = float(input("Side 1: "))

side2 = float(input("Side 2: "))

side3 = float(input("Side 3: "))

if side1>0 and side2>0 and side3>0:

   if side1+side2>=side3 and side2+side3>=side1 and side3+side1>=side2:

       if side1 == side2 == side3:

           print("Equilateral Triangle")

       elif side1 == side2 or side1 == side3 or side2 == side3:

           print("Isosceles Triangle")

       else:

           print("Scalene Triangle")

   else:

       print("Invalid Triangle")

else:

   print("Invalid Triangle")

Explanation:

The next three lines get the input of the sides of the triangle

<em>side1 = float(input("Side 1: ")) </em>

<em>side2 = float(input("Side 2: ")) </em>

<em>side3 = float(input("Side 3: ")) </em>

If all sides are positive

if side1>0 and side2>0 and side3>0:

Check if the sides are valid using the following condition

   if side1+side2>=side3 and side2+side3>=side1 and side3+side1>=side2:

Check if the triangle is equilateral

<em>        if side1 == side2 == side3: </em>

<em>            print("Equilateral Triangle") </em>

Check if the triangle is isosceles

<em>        elif side1 == side2 or side1 == side3 or side2 == side3: </em>

<em>            print("Isosceles Triangle") </em>

Otherwise, it is scalene

<em>        else: </em>

<em>            print("Scalene Triangle") </em>

Print invalid, if the sides do not make a valid triangle

<em>    else: </em>

<em>        print("Invalid Triangle") </em>

Print invalid, if the any of the sides are negative

<em>else: </em>

<em>    print("Invalid Triangle")</em>

4 0
2 years ago
Yo who do u add a pic on here
Juliette [100K]
Go to the me colum when you first open the app
8 0
3 years ago
Which is true about SSH and Telnet?
MaRussiya [10]

Answer:

Data is encrypted on SSH

Explanation:

Telnet and SSH both are the networking protocols. These protocol are used for the security of data. In telnet data is sent over the link without any encryption. That is the reason, in telnet protocol data is less secure.

In SSH (Security Shell) protocol data has been encrypted before transmission. The encryption of data make it more secure between transmitter and receiver.

So the true statement is that, SSH has data encryption.

8 0
3 years ago
When somthing is trustworthy we call it what?
Gnom [1K]

Answer:

dependable

Explanation:

5 0
2 years ago
Read 2 more answers
What is the difference between "call by value" and "call by reference"? Explain with example in c language.
Serjik [45]

Answer:

<u>Call by reference</u>

In an function if the variables are passed as reference variables this means that the variables are pointing to the original arguments.So the changes made in the function on the reference variables will be reflected back on the original arguments.

For example:-

#include<stdio.h>

void swap(&int f,&int s)

{

   int t=f;

   f=s;

  s =temp;  

}

int main()

{

int n,m;

n=45;

m=85;

swap(n,m);

printf("%d %d",m,n);

return 0;  

}

the values of m and n will get swapped.  

<u> Call by value</u>

In this program the values of m and n will not get swapped because they are passed by value.So duplicate copies of m and n will be created and manipulation will be done on them.

#include<stdio.h>

void swapv(int f,int s)

{

   int t=f;  

   f=s;  

   s=temp;

}

int main()

{  

int n,m;

n=45;

m=85;

swapv(n,m);

printf("%d %d",n,m);

return 0;

}

7 0
3 years ago
Other questions:
  • I want to customize my company's logo, name, address, and similar details in all my business documents what option should use?
    12·1 answer
  • You have a hard disk that is formatted with the fat32 file system. you would like to implement file and folder permissions on th
    10·1 answer
  • What are factors that limit a technological design
    11·2 answers
  • Boardman College maintains two files—one for Sociology majors and another for Anthropology majors. Each file contains students'
    5·1 answer
  • Which group of commands all appear on the Standard toolbar?
    7·1 answer
  • Which of the following are the dimensions of feasibility? Group of answer choices cost, schedule, technical, and organizational
    14·1 answer
  • What does a page break do?
    13·1 answer
  • What is the difference between dsl and dial up?
    14·1 answer
  • Write 3 things that can't be done without technology. write your opinion?
    14·2 answers
  • What is the value of the variable result after these lines of code are executed?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!