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
An email address contains the @ character. Write a program that takes asks for an email address input from the user and determin
Dvinal [7]

Answer:

Input: [email protected]

Output: the word is not an email adress

Explanation:

7 0
2 years ago
Why are the keys on the qwerty keyboard arranged the way they are?
sveticcg [70]
Sholes arranged the keys in their odd fashion to prevent jamming on mechanical typewriters by separating commonly used letter combinations.
7 0
2 years ago
Martha is a network monitoring technician working on a firewall for her company’s network. To filter traffic going through the f
tia_tia [17]

Answer:

D

Explanation:

Not much of a tech person, but protocol then firewall seems the most reasonable.

7 0
3 years ago
Read 2 more answers
These operating systems were referred to as command-based.
Doss [256]

{\underline{\boxed{\bf{MS - DOS \:  and \:  UNIX}}}}

3 0
2 years ago
Read 2 more answers
Hue purchased 50 shares of stock on April 24, 2019. The price skyrocketed, so she decided to sell the stock in April of 2020. Wh
nadya68 [22]

Answer:

April 25, 2020

Explanation:

April 25, 2020

In order for an investment to be considered long-term, it must be held for longer than 1 year.

April 24th is not longer than a year, the only answer that is longer than a year of holding is April 25, 2020

8 0
2 years ago
Other questions:
  • Your computer running Windows 7 is doing some very strange things with the operating system. You are fairly certain it is not a
    10·1 answer
  • What is the name of the contextual or specific tab that appears in page layout view when adding a header
    15·1 answer
  • Which security control is most helpful in protecting against eavesdropping on wireless LAN (WLAN) data transmissions that would
    6·1 answer
  • Normal wear and road conditions can take their toll on a car’s steering and suspension system, altering __________. A. wheel ali
    15·2 answers
  • Are video games a viable source of income if you’re good at them
    10·1 answer
  • What happens if none of the selector values match selector in a simple case expression in pl/sql
    6·1 answer
  • The main part of your program has the following line of code.
    7·1 answer
  • I need some help-
    15·1 answer
  • A ____ is an Access feature that makes it easy to enter data.
    7·2 answers
  • // This pseudocode is intended to describe
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!