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
Pie
3 years ago
10

Given a string, an integer position, and an integer length, all on separate lines, output the substring from that position of th

at length.
Ex: If the input is:


Fuzzy bear


3


4


the output is:


zy b


Note: Using a pre-defined string function, the solution can be just one line of code. It does not have to be one line though it can be a lot.


Code:


#include

#include

using namespace std;


int main() {

string workStr;

int indexBegin;

int len;


getline(cin, workStr);

cin >> indexBegin;

cin >> len;


/* Your code goes here */


return 0;

}
Computers and Technology
1 answer:
lana [24]3 years ago
4 0

quetma es elpx mjeghgieo

You might be interested in
Write a c++ program that accepts a string from the user and then replaces all occurrences of the letter e with the letter x
mixer [17]

Answer:

#include <iostream>

using namespace std;

int main()

{

   string str;

   cout<<"Enter the string: ";

   cin>>str;

   for(int i=0;str[i]!='\0';i++){

       if(str[i]=='e'){

           str[i]='x';

       }

   }

   cout<<"the string is: "<<str<<endl;

  return 0;

}

Explanation:

First, include the library iostream for using the input/output instructions.

Create the main function and declare the variables.

Then, use the cout instruction and print the message on the screen.

cin store the string enter by the user into a variable.

After that, take a for loop and if-else statement for checking the condition if the string contains the 'e', then change that alphabet to 'x'.

This process continues until the string not empty.

Finally, print the updated string.

6 0
3 years ago
6. How can you encrypt an entire drive, including files and folders belonging to other users? a. EFS b. User Account Control c.
matrenka [14]

Answer:

A.

Explanation:

Encrypting File System (EFS) is a file system which enables you to encrypt files, thus making them unviewable by any account but your own.

6 0
3 years ago
Which of these devices is usually the default for most home network?
lora16 [44]

Answer:

there are no mutiple choices

5 0
3 years ago
What is a privacy data breach
kotykmax [81]

Answer: A privacy data breach occurs when personal information is stolen or lost or is collected, used or disclosed without authority. A privacy breach occurs when personal information is stolen or lost or is collected, used or disclosed without authority.

Explanation:

Examples of a  data breach might include:

Loss or theft of hard copy notes, USB drives, computers or mobile devices. an unauthorized person gaining access to your laptop, email account or computer network. sending an email with personal data to the wrong person.

7 0
1 year ago
When a percentage of the smallest and largest values are deleted from a data set, the mean of the remaining data values is the a
xz_007 [3.2K]

Answer:

Correct option C

Trimmed mean

Explanation:

A trimmed mean is a method of averaging that removes a small designated percentage of the largest and smallest values before calculating the mean.

Trimmed mean helps eliminate the influence of data points on the tails that may unfairly affect the traditional mean.

Trimmed means are used in reporting economic data in order to smooth the results and paint a more realistic picture.

5 0
3 years ago
Other questions:
  • All of the following are types of data storage devices except CD/DVD computer monitor digital cameras flash drive
    15·1 answer
  • Explain the role of the domain name system
    15·1 answer
  • What is the order in which windows systems receiving and process multiple gpos?
    7·1 answer
  • A machine on a 10 Mbps network is regulated by a token bucket algorithm with a fill rate of 3 Mbps. The bucket is initially fill
    12·1 answer
  • i need to also do a algorithm where if the total is a even number 10 points are added to the score and if the total is odd then
    11·1 answer
  • An attacker tried to hack into the database of a reputed organization. The attacker inserted malicious code into the query of a
    14·1 answer
  • The instructions in a program, when expressed in Python, ...
    7·1 answer
  • what will happen to the contents of the destination ell if you copy the contents of the source cell into the destination cell
    7·1 answer
  • Task 2
    6·1 answer
  • You want to store, organize, and manipulate your photos. what type of software do you need?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!