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
The machine should not be oiled until the
kicyunya [14]
<span>The machine should not be oiled until the recommended time between oilings is up.</span>
6 0
3 years ago
Concentric circles on a disk platter where data is stored;________
bagirrra123 [75]

Answer:

Tracks

Resilient File System (ReFS)

Explanation:

  1. Concentric circles on a disk platter where data is stored is called Tracks
  2. The new file system developed for Windows Server 2012 is called Resilient File System (ReFS). It allows increased stability for disk storage and improved features for data recovery and error checking
4 0
3 years ago
Which option allows you to customize the order of your data ?
Vladimir [108]

✧・゚: *✧・゚:*    *:・゚✧*:・゚✧

                  Hello!

✧・゚: *✧・゚:*    *:・゚✧*:・゚✧

❖ The correct answer choice is B) sorting. When you sort, you can order your sheet however you'd like.

~ ʜᴏᴘᴇ ᴛʜɪꜱ ʜᴇʟᴘꜱ! :) ♡

~ ᴄʟᴏᴜᴛᴀɴꜱᴡᴇʀꜱ

8 0
3 years ago
Read 2 more answers
Janice, who is 15, posts post a picture of herself drinking alcohol and making an obscene gesture on her social network page. wh
mars1129 [50]

answer

A and B

Explanation.

A and B are the answers because this a real life scenario.

it's also can ruin her dreams on going to college to get a degree on what she want's to be and job application on her degree or any kind of job.

8 0
3 years ago
Read 2 more answers
Electronic components in coputers process data using instructions, which are the steps that tell the computer how to perform a p
Dominik [7]

Answer:

True

Explanation:

  • True, the electronic components perform the tasks that are given to the computer.
  • The computer is made up of nothing but the electronic components like Transistors, Circuits etc.  
  • Electronic components are the building blocks of the computer.
  • So essentially all the tasks performed by the computer are actually performed by the electronic components inside it.
  • So it can be understood that the tasks that are given to the computer are performed by the electronic components. They perform the tasks with the instructions given to the computer.  
  • There also special electronic components designed to read, write and perform the tasks given to the computers.
  • The electronic components comprise of the circuits, transistors, resistors and capacitors.
3 0
3 years ago
Other questions:
  • 7. What is the school campus’s setting<br> the school is sanford
    6·2 answers
  • a ____ consists of wires connecting the cpu and other parts of the computer. The _____ transfers data between CPU and memory uni
    6·1 answer
  • what is the purpose of the Outline view in word 2016? check all that apply. 1. editing the format of size and text. 2.working wi
    11·1 answer
  • Which of the following languages does not provide built-in-pattern matching operations (the language, although, has pattern matc
    14·1 answer
  • What type of undocumented yet benign hidden feature launches after a special set of commands, key combinations, or mouse clicks?
    15·1 answer
  • Which type(s) of license(s) allow the underlying software code to be viewed?
    15·1 answer
  • 3. Discuss microprocessor components, chips,
    15·1 answer
  • You will include code that will validate all user input. If the user inputs an invalid value, the program will respond with an e
    14·1 answer
  • nts/viewer/classes/289ef1a5d7c341c284010 Select the compound inequality shown on the graph. 5 4 3 2 1 0 1 2 를 4​
    6·1 answer
  • What is the name of the directory that contains symbolic links to unix sysv rc scripts for runlevel 2?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!