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.
Hello <span>Siyujiang8092</span>
Answer: Software<span> consists of computer programs that govern the operation of a computer.
Hope that helps
-Chris</span>
Answer:
#include<studio.h>
#include<conio.h>
void main()
{
char ch;
printf("Enter any letter");
scanf("%c",&ch);
Answer:
I would need the sentence to make sure that I am correct but I am pretty sure it is C. aficionados
Explanation:
Answer:
5 time
Explanation:
because I am in school tell study