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]
2 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]2 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
You are the system administrator for a medium-sized Active Directory domain. Currently, the environment supports many different
Bogdan [553]

Answer:

All the Above

Explanation:

Domain local groups, global Groups, Universal Security Groups all these 3 groups can be used.

7 0
3 years ago
What is BINARY it is making get confused
enot [183]
It is a number that is expressed in the binary numerical system
6 0
3 years ago
Choose the 3 Points in good story telling
Sidana [21]

Answer:

1.Choose a clear central message 2. Embrace conflict 3.Have a clear structure  

Explanation:

8 0
2 years ago
The registrar does all of the following except:
Yuliya22 [10]
The answer is B. Issue report cards of grades.
3 0
3 years ago
Read 2 more answers
____________________ software is a type of security software designed to identify and neutralize web bugs, ad-serving cookies, a
Sati [7]
The Answer to this question is Web Bugs
8 0
2 years ago
Other questions:
  • If reading or writing a cache line of size 64 bytes to Flash requires 2.56 μJ and DRAM requires 0.5 nJ, and if idle power consum
    9·1 answer
  • The penalties for a person's third DUI conviction include fines of __________.
    11·2 answers
  • Help with this robotics hw pls
    5·1 answer
  • Sabian que hay una violadora sexuar el nombre de usario es SASHENKAFASION me acaba de decir que hackio en donde vivo,mi nombre c
    5·1 answer
  • Read first a user's given name followed by the user's age from standard input. Then use an ofstream object named outdata to writ
    6·1 answer
  • ) Which is true about the agile method?
    7·1 answer
  • When the code that follows is executed, a message is displayed if the value the user entersvar userEntry = (prompt("Enter cost:"
    11·1 answer
  • What type of software testing is generally used in Software Maintenance?
    11·1 answer
  • Cuáles eran las condiciones de vida de las mujeres durante el renacimiento perduran​
    14·1 answer
  • Subscribe to my you tube channel to get all your questions answered
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!