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
How many passes will it take to find the four in this list?
Vaselesa [24]
I don’t know what the heck is it true
3 0
3 years ago
Read 2 more answers
Marketing có phải là bán hàng hay không? Giải thích?
barxatty [35]

Answer:

Sự khác biệt giữa bán hàng và tiếp thị là bán hàng tập trung vào làm việc trực tiếp với khách hàng tiềm năng để khiến họ chuyển đổi, trong khi tiếp thị tập trung vào việc khơi dậy sự quan tâm đến sản phẩm của bạn.

7 0
3 years ago
Read 2 more answers
What Windows Server 2016 edition is used for volume licensing customers in academic markets and allows multiple users to share o
Lunna [17]

Answer:

The correct answer to the following question will be Option D (Data Center).

Explanation:

Data centers are essentially clustered areas where computer and networking infrastructure is focused to gather, store, process, transmit or allow endless supplies of data.

Windows Server 2016 is released in three versions (Microsoft for Windows Server 2016 no longer provides a base version as it has been in Windows Server 2012):

  • Standard
  • Essentials
  • Data center

With a large number of integrated environments, the Data center is suitable for all organizations for heavy IT workload criteria.

Therefore, Option D is the right answer.

6 0
4 years ago
The ipv6 address fields are 128 bits long, and as such there is no need to extend ip addressing by using either dhcp or nat (i.e
Minchanka [31]

Answer:

True

Explanation:

according to coursehero it's true

6 0
2 years ago
Can a syntax error occur in a block-based code? Why or why not?
valentina_108 [34]

Answer:

I'm confusd waht u m me ljhnab

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • When determining the cost of an item, the seller will often analyze the demand as well as the supply before setting the price of
    8·2 answers
  • If no mode is indicated for a parameter, what mode is used?
    15·1 answer
  • A user is given Read permission to a file stored on an NTFS-formatted volume. The file is then moved to a different folder on a
    5·1 answer
  • Which processor is better for madvr
    13·1 answer
  • How many electrons are there in an atom of carbon? A. Four B. Eight C. Six D. One
    15·2 answers
  • Which of the following is not a protocal? <br><br>A) HTTP<br>B) FTP<br>C) WWW<br>D) HTTPS​
    15·2 answers
  • Assume that PrecinctReport is a structured type with these fields, address (a string), and three int fields which are counts of
    9·1 answer
  • (Display four patterns using loops) Ask the user to enter an integer to
    8·1 answer
  • The __________ was the first all electronic computer.
    5·1 answer
  • What is e banking effects
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!