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
mr_godi [17]
3 years ago
15

Write a function called changeCharacter that takes three parameters – a character array, its size, and the replacement character

– to change every third character in the array to its replacement character
(C++ coding)
Computers and Technology
1 answer:
ser-zykov [4K]3 years ago
3 0

Method explanation:

  • Defining a method "changeCharacter" that takes three parameters that are "character array", and two integer variable "s, k" in its parameters.
  • Inside the method, a for loop is declared that takes array value and defines a conditional statement that checks the 3rd character value in the array, is used to the array that holds its key-value.
  • Please find the full program in the attachment.

Method description:

void changeCharacter(char* ar, int s, int k)//defining a method changeCharacter that takes three parameters

{

  for(int j = 1; ar[j]!='\0'; j++)//defining a for loop for 3rd character value in array  

  {

      if(j%3== 0)//use if block that check 3rd character value in array  

      {

          ar[j-1] = k; //Changing the 3rd character in array

      }

  }

}

Learn more:

Program: brainly.com/question/12975989

You might be interested in
DOES ANYONE KNOW HOW TO CHAGE THE IP ON A COMPUTER?
MaRussiya [10]
Try downloading a VPN

8 0
4 years ago
Which component of the technological system is achieved when an automobiles airbag inflates
Aleonysh [2.5K]
Process is the component achieved.

8 0
3 years ago
Hi please help ASAP it's about html!​
uranmaximum [27]
<h2><u>Given</u> :-</h2>

Create a HTML code for writing a web page for your school time-table.

<h2><u>Answer</u> :-</h2>

<html>

<head>

<title> Time Table </title>

</head>

<hrcolor = "red">

<hrcolor = "blue">

<body>

<table><tr = "7"><md = "7"><Period 1_></table>

</body>

</html>

\\

Answered by - ItzMaster

7 0
3 years ago
Write a pseudocode thats accept and then find out whether the number is divisible by 5 ​
meriva

Answer:

input number  

calculate modulus of the number and 5  

compare outcome to 0  

if 0 then output "divisible by 5"  

else output "not divisible by 5"

Explanation:

The modulo operator is key here. It returns the remainder after integer division. So 8 mod 5 for example is 3, since 5x1+3 = 8. Only if the outcome is 0, you know the number you divided is a multiple of 5.

3 0
4 years ago
List three ways you can help someone who is being bullied in of just being a bystander​
nignag [31]

Answer:

1.) Let a teacher, administrator or other safe adult know about what's going on.

2.) If someone is being physically harmed, you can call the police or 911.

3.) If the bullying is mild, (Name calling, insults, etc.) you can attempt to step in.

Explanation:

N/A

8 0
3 years ago
Other questions:
  • Consider the following program segment. ifstream inFile; //Line 1 int x, y; //Line 2 ... //Line 3 inFile &gt;&gt; x &gt;&gt; y;
    13·1 answer
  • Jimmy is running out of desk space. He keeps three computers on his desk. The three computers can’t be moved, and they need to b
    5·2 answers
  • What are the careers needed to create a video game? Name all the careers involved please.
    15·1 answer
  • How many questions do you need unlock messages
    6·1 answer
  • LISTEN I NEED EVERY SINGLE BRAINLY USER TO RE POST THIS THERE IS A USER WHO JUST SAID THEY ARE GOING TO KILL THEMSELVES PLEASE C
    12·2 answers
  • Can some one help me answer this question plz
    8·1 answer
  • Which of the following statements is TRUE of a peer-to-peer network?
    10·1 answer
  • Why would you browse by entering a URL rather than use a link in a Web page
    15·1 answer
  • 30 Points!!
    13·2 answers
  • A mobile phone app asks the user to point the phone's camera at a room and then applies the phone's LIDAR scanning function. Wha
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!