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
PilotLPTM [1.2K]
2 years ago
11

What is the output of the code snippet given below?string s = "abcde";int i = 1;while (i < 5){ cout << s.substr (i, 1);

i++;}a. no outputb. abcdc. abcde d. bcde
Computers and Technology
1 answer:
Ronch [10]2 years ago
4 0

Answer:

The answer is "Option d".

Explanation:

In the given C++ program code, two-variable is defined, that is "s and i", in which variable s is a string type that holds a value, that is "abcde", and variable i is an integer type, that holds a value '1'.

  • In the next line, a while loop is declared, that uses integer variable which value is less than 5, inside a loop a substring function is used, that specifies the number of character and return its value.  
  • In array and string indexing starts from 0, and that variable i starts from 1, that is used in substring function, that's why it will print only "bcde".
You might be interested in
Hi<br>is it right?<br>"I think there is a small mistake in the quotation(second not first)"​
Molodets [167]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

  The correct option to this question is:

.clr{color:blue;}

I write the complete code of HTML using this CSS style to execute this scenario as given below

<html>

<head>

<style>

.clr

{

color:blue;

}

</style>

</head>

<body>

<a href="pg.html" class="clr">click here</a>

<h2 class="clr">Home</h2>

</body>

</html>

The bold text is a complete code of this question.  When you will run it it will execute a link and Home text on the page in blue color. So the correct option is .clr{color:blue;}

7 0
2 years ago
The amount of interest you will earn in one year from a savings account is the _____. A) APY B) return C) IDA D) CD
pav-90 [236]
B) return,<span>D) CD  i now is the </span>
7 0
2 years ago
Read 2 more answers
How would you print from 1 to 1000
Hitman42 [59]

Answer:

There are two ways to print 1 to 1000

  1. Using Loops.
  2. Using Recursion.

Explanation:

Using loops

for(int i=1;i<=1000;i++)

{

  cout<<i<<" ";

}

Using recursion

Remember you can implement recursion using a function only.

void print(int n)

{

  if(n==0)

  return;

  print(n-1);

  cout<<n<<" "';

}

you should pass 1000 as an argument to the function print.

5 0
3 years ago
I am sorting data that is stored over a network connection. Based on the properties of that connection, it is extremely expensiv
Ann [662]

Answer: Provided in the explanation section

Explanation:

The question to this problem says;

Question:

I am sorting data that is stored over a network connection. Based on the properties of that connection, it is extremely expensive to "swap" two elements. But looping over the elements and looking at their values is very inexpensive. I want to minimize swaps above all other factors. Choose the sorting algorithm we studied that will perform the best:

ANSWER

1. Merge Sort

Because merge sort uses additional memory instead of swapping the elements.

2. Merge Sort and Quick Sort both can be used with multi processor.

cheers i hope this helps !!!

4 0
3 years ago
if a hacker wants to exploit the TCP three-way handshake, what is the most effective way to go about it?
goldfiish [28.3K]

The most effective way to exploit TCP three-way handshake is TCP SYN flood.

  • SYN flood attack is simply a kind of computer attack that begins with 3-way TCP handshake.
  • TCP SYN flood is also called SYN flood and it is a type of distributed Denial of Service (DDoS) attack that uses every part of the normal TCP three-way handshake to eat up resources on the known server and render it non-functional
  • With TCP SYN flood, a hacker can eat up resources of target's computer and makes it unresponsive.

From the above, we can therefore say that the most effective way to exploit TCP three-way handshake is TCP SYN flood.

Learn more from:

brainly.com/question/14739766

7 0
2 years ago
Other questions:
  • Which of the following statements about the FAFSA process are TRUE?
    6·1 answer
  • How many valence electrons are present in the atom of the atomic number of 12?
    10·1 answer
  • In Outlook 2016, what are the three format options when sending an email message? Check all that apply.
    7·1 answer
  • What sends massive amounts of email to a specific person or system that can cause that user's server to stop functioning? mail b
    6·1 answer
  • IOS jail broken or Android unrooted which is better to hack with
    6·1 answer
  • ap csp The local, remote, and upstream _______ can each have multiple ___ _____. When a participant in a collaborative group on
    5·1 answer
  • Write a program that asks the user to enter two integer numbers X and Y. The program halves each number between X and Y then pri
    15·1 answer
  • Select the correct answer.
    10·1 answer
  • Two girls were born to the same mother, on the same day, at the same time, in the same month and the same year and yet they're n
    7·1 answer
  • What's the best item in the binding of isaac?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!