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
KIM [24]
2 years ago
11

Using the C language, write a function that accepts two parameters: a string of characters and a single character. The function

shall return a new string where the instances of that character receive their inverse capitalization. Thus, when provided with the character ’e’ and the string "Eevee", the function shall return a new string "EEvEE". Using the function with the string "Eevee" and the character ’E’ shall produce "eevee".
Computers and Technology
1 answer:
Sav [38]2 years ago
8 0

Answer:

#include <stdio.h>

void interchangeCase(char phrase[],char c){

  for(int i=0;phrase[i]!='\0';i++){

      if(phrase[i]==c){

          if(phrase[i]>='A' && phrase[i]<='Z')

              phrase[i]+=32;

          else

              phrase[i]-=32;      

      }

  }

}

int main(){

  char c1[]="Eevee";

  interchangeCase(c1,'e');

  printf("%s\n",c1);

  char c2[]="Eevee";

  interchangeCase(c2,'E');

  printf("%s\n",c2);    

}

Explanation:

  • Create a function called interchangeCase that takes the phrase and c as parameters.
  • Run a for loop that runs until the end of phrase and check whether the selected character is found or not using an if statement.
  • If the character is upper-case alphabet, change it to lower-case alphabet and otherwise do the vice versa.
  • Inside the main function, test the program and display the results.
You might be interested in
Having reviewed dod wireless stig (ver6, release 1), sarah learns she may only utilize secnet 54 and ______________ for transmit
xeze [42]
<span>Sarah learns she may only utilize SecNet 54 and SecNet 11 for transmitting classified information up to top secret.
</span>

SecNet 11 Plus is a family of encrypted <span>802.11b wi-fi <span>networking products. The Army has also approved</span></span> SecNet 11<span> as part of the classified Navy Marine Corps Intranet (NMCI) wireless solution. There are many products in SecNet 11 family, such as SecNet 11 Plus PC card, the SecNet 11 Wireless ridge, and the SecNet 11 Key Fill Cable etc.</span>

7 0
3 years ago
A Game Object must have a Transform<br><br> True<br><br> False
vovikov84 [41]

Answer:

Yes

Explanation:because,have to update there apps or games and change there characters

3 0
3 years ago
A range in which a measuring instrument or controller does not respond is the
cricket20 [7]

Answer:

Dead band

Explanation:

In Instrumentation, dead band is defined as a range in which a measuring instrument or controller does not respond. It is also known as the neutral zone or dead zone and it is usually caused by packing friction or unbalanced forces.

4 0
2 years ago
I just got my driver's permit!!! However, it says I have 2 restrictions. What are the restrictions? Is it the not being allowed
leva [86]
I think it's having a trusted adult with you to drive

5 0
3 years ago
Which of the following would be the most appropriate way to define a method that calculates and returns the final price, after t
Oksanka [162]

D. I hope it helped
5 0
2 years ago
Other questions:
  • Which are malicious codes? <br><br> JavaScript <br> Key loggers <br> Scrum <br> Spyware <br> Worms
    12·1 answer
  • Which loan type requires you to make loan payments while you’re attending school?
    9·1 answer
  • Bullets in a text box will do which of the following?
    9·2 answers
  • One group of students did an experiment to study the movement of ocean water. The steps of the experiment are listed below.
    10·1 answer
  • Which button will allow you to insert quotes and notes into text into a document​
    12·1 answer
  • Circular error are caused by adding the cell name of a/an cell to aformula
    7·1 answer
  • You’re having trouble connecting to the Internet so you call your Internet service provider for help. They need to know the perm
    15·1 answer
  • What is your biggest takeaway on that subject?​
    8·1 answer
  • Why is it easier to spot a syntax error than a logical error?​
    10·2 answers
  • Large and fast disks should be used for as doing so will ensure work is done as quickly as possible?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!