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
masya89 [10]
2 years ago
11

The following code segment is a count-controlled loop going from 1 to 5. At each iteration, the loop counter is either printed o

r put on a queue depending on the result of Boolean function RanFun(). (The behavior of RanFun() is immaterial. At the end of the loop, the items on the queue are dequeued and printed. Because of the logical properties of a queue, this code segment cannot print certain sequences of the values of the loop counter. Is the following output possible using a queue: 1 2 3 4 5?
Computers and Technology
1 answer:
quester [9]2 years ago
4 0

Answer:

True.

Explanation:

For all the count values, if Ranfun() returns true then all the values of count would be printed. Then the sequence of count values printed would be 1 2 3 4 5. Also for all the values of count if Ranfun() returns false then all the values would be enqueued. When we try to dequeue elements from queue we would get them in the same order of their entry into the queue. Thus, the sequence would be 1 2 3 4 5. Hence, we can say that this output sequence is possible. TRUE.

You might be interested in
Need help asap<br> give the correct answer!!
blagie [28]
It’s either b or c, but my final answer would be C
4 0
2 years ago
Read 2 more answers
Which table option automatically adjusts column widths to fit cell content? autofit contents merge cells autofit window fixed co
noname [10]
Which table option automatically adjusts column widths to fit cell content?
autofit contents
6 0
3 years ago
An administrator needs to make sure that video conferencing is allocated a high portion of bandwidth within a company network. W
frosja888 [35]

Answer:

QoS

Explanation:

We could use a blacklisting or a MAC filtering to remove from the network, and in this way, we're going to get a high portion of bandwidth, but other must work too, and the whitelisting have almost the same function, but QoS Quality of service is specifically for these cases where we need high bandwidth for a video conference, we can make this with some tools or techniques like jitter buffer and traffic shaping.

4 0
3 years ago
12. Write C statement(s) that accomplish the following. a. Declare int variables x and y. Initialize x to 25 and y to 18. b. Dec
saul85 [17]

Answer:

a.

int x = 25;

int y = 18;

b.

int temp = 10;

char ch ='a';

c.

x += 5;

d.

double payRate = 12.5;

e.

int tempNum = firstNum;

f.

int tempp = x;

x = y;

y = tempp;

g.

printf("Value of x = %f\n",x);

printf("Value of y = %f\n",y);

printf("Arithmetic = %f\n",(x + 12/y -18));

h.

char grade = 'A';

i.

int a,b,c,d;

a = 5; b = 2; c = 3; d = 6;

j.

int x = round(z);

Explanation:

The answers are straight forward.

However, I'll give a general hint in answering questions like this.

In C, variable declaration is done by:

data-type variable-name;

To declare and initialise the variable, you do;

data-type variable-name = value;

So, for questions that requires that we declare and initialise a variable, we make use of the above syntax..

Take (a) for instance:

int x = 25;

int y = 18;

Same syntax can be applied to (b), (d), (e), (h) & (I)

For question (c);

This can be done in two ways;

x = x + 5;

Or

x+=5;

Both will give the same result.

For question (f):

We start by initialise a temporary variable that stores x.

Then we store the value of x in y.

Then we store the content of the temporary variable to y.

This swaps the values of x and y

For question (g):

When printing a double variable in C, we make use of '\f' as a string format

For question (j):

The round function is used to round up a double variable to integer.

3 0
3 years ago
What is a quick way to determine if a site might contain reliable information?
xz_007 [3.2K]
<span>The best and most correct answer among the choices provided by the question is the fourth choice.

A way of determining that a site is realiable is examining comments about the <span>webpage.</span></span><span>
I hope my answer has come to your help. God bless and have a nice day ahead!</span>
5 0
2 years ago
Read 2 more answers
Other questions:
  • What do you click to create a new presentation in Normal view? A. Section B. Blank Presentation C. Layout D. New Slide
    14·2 answers
  • Marisol manages the online advertising campaigns for a chain of toy stores with both a physical and an online presence. Which Go
    7·1 answer
  • What are some ways to accept data typed into a cell? Check all that apply.
    15·1 answer
  • I have been trying to work on this for a while now, and this is on excel
    11·1 answer
  • You can use ???? a to test tread wear on your tires
    14·2 answers
  • "As a ____ database management system, Access is particularly powerful because you can enter data once and then retrieve informa
    6·1 answer
  • Grace is the editor of her school newspaper. Which feature of a word processing program would she use to make her changes visibl
    7·2 answers
  • I'm trying to move the figure a little away from, the column line and every time I move it and click ok it goes back to being be
    11·1 answer
  • Lol WAKE UP!!! and get ready to answer my questions.
    12·1 answer
  • Distinguished between
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!