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
Any computer expert to help me answer this question.. am giving brainliest
ioda

Answer and explanation:

1. It asks for the total expenses for the month of March. So, let's add all of the March expenses up.

1,600 + 2,100 + 850 + 480 + 2,800 = $7,830 (which is the answer)

2. It asks what the highest expense for wages are. That would be $5,080. Out of all of the times that the wages have been paid, in April, it was the highest, at $5,080. So, $5,080 is the answer.

3. It asks how many items cost less than $1,000 in April. The only thing that cost less than $1,000 in April was the water because it only cost $370. So, the answer would be 1.

Hope this helps!

6 0
3 years ago
HELP ME PLEASE
MAXImum [283]

Explanation:

Threats

Computer Security Threats are possible dangers that can affect the smooth functioning of your PC. These may be a small piece of adware or a harmful Trojan malware. In the present age, computer security threats are constantly increasing as the world is going digital. computer security threats

Types of Computer Security Threats

There are several types of computer security threats such as Trojans, Virus, Adware, Malware, Rootkit, hackers and much more. Check some of the most harmful types of computer Security Threats.

COMPUTER VIRUS

A Computer Virus is a malicious program, which replicates itself and infects the files and programs of your PC and can make them non-functional.

COMPUTER WORMS

A self-replicating computer program that spreads malicious codes, computer worms make use of the network to send copies of the original codes to other PCS. It can also go to the extent of sending transferring documents utilizing the email of the user.

SCAREWARE

Scareware is a malware that tricks victims to buy software by displaying fake virus alerts. A scareware infected PC may get pop-ups of fake malware threats and to get rid of those, users are prompted to purchase a fake anti-malware software.

KEYLOGGER

Also known as a keystroke logger, Keyloggers can track the real-time activity of a user on his computer. Keylogger runs in the background and records all keystrokes made by a user and passes the information to the hacker with the motive to steal password and banking details.

ROOTKIT

A rootkit is considered extremely dangerous as they appear to be legitimate files and deceives the computer user. Rootkit masks viruses and worms and makes them appear as necessary files. These are very difficult to remove and only an antivirus with the anti-rootkit feature can remove a rootkit.

Tips for Best Computer Security

For best computer security, you must follow certain guidelines, which are also called computer best practices. 1. Use the best antivirus software, which not only provides protection to your PC but also internet protection and guards against cyber threats. 2. Do not download untrusted email attachments and these may carry harmful malware. 3. Never download software from unreliable sites as they may come with a virus that may infect your system as soon as you install the software.

4 0
2 years ago
Why does a bus topology require a terminator? a) because otherwise it would be a ring network b) because otherwise the packets w
Maksim231197 [3]

Answer:

B)because otherwise the packets will bounce back and forth from end to end repeatedly

Explanation:

Bus topology can be regarded as a kind of topology for a Local Area Network, it is one that has it's nodes connected to a single cable(backbone) and any break in the so called backbone, there will be failure in the entire segment. However a Terminator is usually attached to the end-points of a bus network so that the signal is absorbed by the Terminator and as a result of this the signal will not reflect back down the line. If there is no Terminator there would be bouncing back and forth of packet in an endless loop.It should be noted that a bus topology require a terminator because otherwise the packets will bounce back and forth from end to end repeatedly

.

3 0
3 years ago
Read 2 more answers
What is also known as a visual aid in a presentation?
kap26 [50]

Answer:

Option D i.e., slide are the correct option.

Explanation:

The following option is true because in the PowerPoint presentation slide is the visual aid. With the help of the visual aid, the user can add the acumen to its PowerPoint presentation and it is the item in which the user can summarize their information and data that is slide. It is important for the creation of the official or the business purpose presentation.

3 0
4 years ago
Read 2 more answers
After you use the fill handle to copy cell contents, the quick copy options button appears, which can be used to fill the cells
Dimas [21]
After you use the fill handle to copy cell contents, the autofill options button appears, which can be used to fill the cells with only specific elements of the copied cell. The button <span>is a small square that appears in the bottom-right corner when you select a cell or range.</span>
7 0
3 years ago
Other questions:
  • How do you plan to keep your personal and professional connections and activity seperate on various social media platforms?
    15·1 answer
  • is the process of creating a message to be communicated. a. Encoding b. Decoding c. Receiving d. Sending
    10·2 answers
  • How do you pass graphic design. I have to make a project with a picture in the letter.
    6·1 answer
  • Write a C program to input basic salary of an employee and calculate gross salary according to given conditions.
    11·1 answer
  • __________ systems support the search for and sharing of organizational expertise, decision making, and collaboration at the org
    9·1 answer
  • How much tabs can you open with 8GB of ram? ​
    6·1 answer
  • Compute the average of a list of user-entered integers representing rolls of two dice. The list ends when 0 is entered. Integers
    12·1 answer
  • What microphone is this
    8·1 answer
  • 10. Site-to-Site VPN architecture is also known as
    6·1 answer
  • Please help me i need rn please help​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!