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
To create a DateTime object that represents a due date that's 90 days after the current date, you use the following code:
Helen [10]

If $due_date contains a DateTime object, $due_date_diff will contain  

c. a DateInterval object

Explanation:

  • The DateInterval class ¶  represents a date interval.
  • A date interval stores either a fixed amount of time (in years, months, days, hours etc) or a relative time string in the format that DateTime's constructor supports.
  • The diff method is just as easy to use, but provides an extra piece of information: total days. This is important because when using the DateTime object to find a difference, we have a source and destination date, and therefore we can reduce the units of time into larger denominations. However, having the total number of days in between is a valuable piece of information.
  • The PHP DateTime class has three methods that work with a DateInterval object:
  1. add
  2. sub
  3. diff

Properties

  • y  :Number of years.
  • m  :Number of months.
  • d  :Number of days.
  • h  :Number of hours.
  • i  :Number of minutes.
  • s  :Number of seconds.
4 0
3 years ago
Why is spyware more dangerous than adware
steposvetlana [31]

To find out how spyware is more dangerous, we must know what each term mean.

Adware is a <em>software that automatically displays advertising material usually on a site that a user goes to</em>.

Spyware is a <em>unwanted software that steals your internet usage data and personal information</em>.

So while Adware can be extremely annoying, it is not as potentially harmful as Spyware, which can steal your personal information and potentially ruin your life.

~

7 0
2 years ago
Alan wants to find an image of a car he can use in a presentation. What button should he click in the Images group to run a sear
maksim [4K]

Alan should click on the Clip Art section and then run a search by entering the keyword in the search menu.

A. Clip Art

<u>Explanation:</u>

Alan wants to find an image of a car that he can use in his presentation. It is always a good practice to include pictures and other media like videos, GIFs, and sound effects to make a presentation more engaging and interesting.

In order to include an image, Alan should click on the Clip Art section and then run a search by entering the keyword in the search menu. The clip art allows the user access to the saved images and to the internet for searching the required image.

3 0
3 years ago
Should you let your computer scan email attachments before opening them? Why?
NISA [10]
Jjsjskskiakskskakksjakakoa
8 0
3 years ago
Read 2 more answers
List &amp; briefly explain 5 benefits of having a Business bank account.
oee [108]

Answer:  down there

Explanation:

Some other benefits come from establishing a business bank account. You can gain access to services that make life easier, such as merchant account and payroll services, free online banking and, importantly, easier access to small business loans.

3 0
3 years ago
Read 2 more answers
Other questions:
  • The Beaufort Wind Scale is used to characterize the strength of winds. The scale uses integer values and goes from a force of 0,
    5·1 answer
  • Alt text is considered a(n ____ attribute because it provides access to everyone who visits your site.
    12·1 answer
  • Write a statement that compares the values of score1 and score2 and takes the following actions. When score1 exceeds score2, the
    7·1 answer
  • Intellectual ______ is the legal term for ownership of intangible assets such as ideas, art, music, movies, and software.
    13·2 answers
  • A finally clause will execute:
    8·1 answer
  • A __________ note is a private note that you leave for yourself or for other people who might use the presentation file
    9·1 answer
  • What Network does zoom run on? Does anyone use it (hint Hint)
    6·1 answer
  • Select the correct answer. Nancy has made a small web page with the new features of HTML5. She has to show this web page in scho
    9·1 answer
  • write the definition of a class clock. the class has no constructors and one instance variable of type int called hours.
    12·1 answer
  • ___ is a form of electronic money that is decentralized and whose transactions are encrypted, processed, and recorded via peer-t
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!