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]
3 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]3 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
Fill in the blank: _____ data are statistical and numerical facts about a project.
evablogger [386]
Quantitative hope that helps
3 0
2 years ago
Read 2 more answers
You started writing a paper yesterday. You worked on it again today. After a few hours, you realized that you have introduced so
mihalych1998 [28]

Answer:

I think it is manage document.

Explanation:

managing helps us to organize things and write things with ease.

3 0
3 years ago
Read 2 more answers
Only Lysita knows the password for the question......
emmasim [6.3K]
The correct answer is 1234.

7 0
3 years ago
Research and recommend the most appropriate VPN technology. The most likely solution is either an Internet Protocol Security (IP
chubhunter [2.5K]

Answer:

The five eras are general- purpose mainframe and minicomputer computing, personal computers, client/server networks, ...

7 0
3 years ago
Remember that kid who would always ask you for your food, even though he packed his own lunch.
Verizon [17]

Answer:

ye ye

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • Being able to express your thoughts in an email is a primary technology skill. True or False
    8·2 answers
  • Why does the PC send out a broadcast ARP prior to sending the first ping request
    12·1 answer
  • An essential skill today is knowing how to cite sources properly. Creative Commons has a system of licenses and tools for creato
    11·1 answer
  • IBF Consultants, LLC provides consulting services in privacy and theft deterrence solutions. Another client has very sensitive d
    7·1 answer
  • How often are computer and user policies applied after a user has logged into a computer?
    15·1 answer
  • Use the SQL Server Management Studio to complete the following.
    9·1 answer
  • Emerson needs to tell his browser how to display a web page. Which tool will he use?
    8·2 answers
  • Which type of cloud computing offers easily accessible software and applications on the machines?
    7·1 answer
  • Which of the following is not a data visualization technique?
    6·1 answer
  • Jackie is planning a surprise birthday party for her best friend and is researching a location to have the party. Jackie found a
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!