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
andriy [413]
3 years ago
8

6.10.1: Modify a C string parameter. Complete the function to replace any period by an exclamation point. Ex: "Hello. I'm Miley.

Nice to meet you." becomes: "Hello! I'm Miley! Nice to meet you!"
Computers and Technology
1 answer:
Andrej [43]3 years ago
6 0

Answer:

#include <iostream>

#include <cstring>

using namespace std;

void replacePeriod(char* phrase) {

int i = 0;

while(*(phrase + i) != '\0')

{

if(*(phrase + i) == '.')

*(phrase + i) = '!';

i++;

}

}

int main() {

const int STRING_SIZE = 50;

char sentence[STRING_SIZE];

strcpy(sentence, "Hello. I'm Miley. Nice to meet you.");

replacePeriod(sentence);

cout << "Updated sentence: " << endl;

cout << sentence << endl;

return 0;

}

Explanation:

  • Create a function called replacePeriod that takes a pointer of type char as a parameter.
  • Loop through the end of phrase, check if phrase has a period and then replace it with a sign of exclamation.
  • Inside the main function, define the sentence and pass it as an argument to the replacePeriod function.
  • Finally display the updated sentence.
You might be interested in
Exchanging which type of data uses the least bandwidth?
Mariulka [41]

Answer:

Voice data uses less bandwidth during exchanging  

Explanation:

The in-network volume of data been transferred between two network points. The data transfer in the network will be heavy and some time it will less.  

It all depends on the end-user data transfers. If end-user transfer media files such as video or bandwidth will be used heavy. If voice data is used then it uses very less.  

Suppose end-user transfer txt file or XML files some it uses very less bandwidth that also depends on file size transfer.

8 0
3 years ago
BST
mafiozo [28]

Answer:

Explanation:

Over the past three decades, as companies have created new security technologies to help defend businesses and consumers, attackers have quickly adapted. While most technologies raise the bar that attackers have to vault to compromise a business network or a consumer system, security technology has largely failed to blunt their attacks.

In the face of a workforce largely uneducated about security and a shortfall in skilled security professionals, better technology isn't just a boon but a requirement. "But there may be 100 bad guys to every security professional, and that means that it is a constant battle."

Luckily, new technologies are in the pipeline.

7 0
3 years ago
Which clue can be used to identify a chemical reaction as a combustion reaction?
Alina [70]
A hydrocarbon reacts with oxygen
7 0
3 years ago
A company wishes to begin the process of implementing a multi-party system and is looking for other companies with similar inter
Andre45 [30]

If a company wishes to begin the process of implementing a multiparty system using block-chain, this provides Trust among the organizations.

<h3>What is a block chain?</h3>

A block chain is a listing of records referred to as blocks. Cryptography is used to link the blocks collectively.

Beginning a process of implementing a multi-party system provides trust among the organization, and not ownership, intent or uniqueness.

Read more about <em>systems </em>here:

brainly.com/question/14364696

7 0
2 years ago
Please write 2 paragraphs on where you envision yourself academically, and personally in 5 years, and in 10 years.
strojnjashka [21]

Answer:

Explanation:

This is a personal answer because everyone envisions something different.

In 5 years, I hope to have a well established Front-End Development freelancing site and various clients. Hopefully, this will drastically increase my income and allow for more options. I also would like to start investing heavily in different areas of interest. As for personal life, I would like to learn an instrument and work on developing relationships with those close to me.

In 10 years, I hope to have a large sum of money invested in various assets. I would also love to buy a piece of land and build a small home for myself. I see myself also having worked for a startup company developing an application that would drastically better the lives of a specific group of individuals. If all of this were to become a reality, I guess the only thing left that I would love to do would be to travel the world with someone special by my side.

Again, everyone's vision is different/unique and special to them. Hope this helped.

7 0
3 years ago
Other questions:
  • What kind of device is a printer? output or input
    13·1 answer
  • Ray has to type an invoice using the QWERTY keyboard. Along with letters and numbers, he also has to insert the dollar sign. Whi
    13·1 answer
  • Consider the clipping of a line segment in two dimensions against a rectangular clipping window. Show that you require only the
    10·1 answer
  • By using password-stealing software, ________ capture what is typed on a keyboard and easily obtain enough personal information.
    5·1 answer
  • Which option describes the purpose of configuring native supplicant profile on the cisco ise?
    7·1 answer
  • Which of the following services provides hardware, an operating system, and a database management system (DBMS) on a cloud-based
    6·1 answer
  • The process of converting information from a form/questionnaire is referred to as data preparation. This process follows a four-
    10·1 answer
  • Which type of software has no restrictions from the copyright holder regarding modifications of the softwares internal instructi
    12·1 answer
  • Big Project, Giving 5 stars, a Thanks, 80 points, and Branliest to whoever answers them correctly
    9·2 answers
  • Define a function in Scheme (or relation in Prolog) that checks whether a set of elements (represented as a list) is a subset of
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!