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]
3 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]3 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
What: A challenging question on this module's material.
Alekssandra [29.7K]

Need further information!!!

6 0
3 years ago
Use the drop-down tool to match each definition to the correct word or phrase. The computer that responds to requests from the c
Lera25 [3.4K]

Answer:

The computer that responds to requests from the client computer:  

Server

Connects network devices or different parts of a network:  

Switch

A piece of equipment that directs data where it should go:  

Router

Connects many different Ethernet devices and allows them to connect to the network with one connection:  

Hub

The computer that uses service provided by a server:  

Client

Explanation:

6 0
3 years ago
O How basic blocks are identified and how the blocks are used to construct control flow graphs
OLEGan [10]

Basic blocks are identified  because they are known to be a straight line that is known also as a code sequence that tends to have no branches in regards to its in and out branches and its exception is only to the entry and at the end.

Note that  Basic Block is said to be a composition  of statements that is known to be one that often always executes one after other, and this is often done in a sequence.

<h3>How do you create a flow graph from the basic blocks?</h3>

Flow graph  is gotten by:

  • Lets Block B1 be the initial node and also Block B2 will tend to follows B1, so from B2 to B1 there is seen a kind of an edge.

Note that the first task is for a person to partition a sequence of three-address code and this is done into basic blocks.

Hence, Basic blocks are identified  because they are known to be a straight line that is known also as a code sequence that tends to have no branches in regards to its in and out branches and its exception is only to the entry and at the end.

Learn more about basic blocks from

brainly.com/question/132319

#SPJ1

5 0
1 year ago
All of the following are methods to improve the communication of your key messages EXCEPT:
uysha [10]

Answer:

Fill the slides with images and animations

Explanation:

these will most likely distract the audience

6 0
3 years ago
Read 2 more answers
Develop the truth table for each of the combinational logic circuits
Fudgin [204]

Answer:

ang haba po grabe hahahhaahhahahahahah

Explanation:

pabrainlest po t.y

3 0
2 years ago
Other questions:
  • What is html?
    9·2 answers
  • 2 negative impact of excessive use of computer even in solving mathematical problem.
    11·1 answer
  • A network engineer arrives at work and discovers that many users are having problems when attempting to connect to the company n
    9·2 answers
  • This program will convert a set of temperatures from Fahrenheit to Celsius and Kelvin. Your program will be reading in three dou
    11·1 answer
  • Which famous individuals was born on october 31st?
    7·1 answer
  • Create a text file named employee.dat containing the following data: b. Write a C++ program to read the employee.dat file create
    6·1 answer
  • Please hurry!
    15·2 answers
  • It is a single strand of metal capable of transmitting power or data from one area to<br> another
    11·1 answer
  • In a selection, the else clause executes ______________. a. always b. when the tested condition is false c. when the tested cond
    6·1 answer
  • In _________, the process requests permission to access and modify variables shared with others. a) entry section b) critical se
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!