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
Explain set associative mapping<br>​
gtnhenbr [62]
Set-associative mapping allows that each word that is present in the cache can have two or more words in the main memory for the same index address. Set associative cache mapping combines the best of direct and associative cache mapping techniques.
6 0
3 years ago
Create a spreadsheet that lists the ten currencies you chose. For each currency, enter an amount and create a
Softa [21]

Answer:

its a very lengthy one

Explanation:

4 0
2 years ago
If you have a mix of 32-bit and 64-bit versions of windows, which architectures should you add a unattended installation file fo
umka21 [38]
64 bit the likely hood of it failing is much less
4 0
3 years ago
COMO HA SIDO LA INNOVACION DE ESTE OBJETO TECNOLOGICO DURANTE SU EVOLUCIÓN
Marizza181 [45]

Answer:

Cual es el objeto tecnologico?

Explanation:

Si dices Cual,puede ser que te ayude.

3 0
3 years ago
Ling has configured a delegate for her calendar and would like to ensure that the delegate is aware of their permissions. Which
const2013 [10]

Answer:

Tasks>Editor (B)

Explanation:

I just did the test

4 0
3 years ago
Read 2 more answers
Other questions:
  • Trading your bicycle for a snowboard exemplifies ?
    15·1 answer
  • What is needed to create a good problem statement?
    10·1 answer
  • Web sites use _____ to track users while they are on the site.
    14·1 answer
  • Look act the picture
    5·1 answer
  • Which key is used in word processors to create indentations?
    13·2 answers
  • 3. In 1989, the first handheld console was released by _____ and it was called ________.
    13·1 answer
  • "Rights and duties are two sides of the same coin." Explain with examples​
    5·1 answer
  • If a movie, song, or book is offered for free, is it malware?
    15·1 answer
  • Which of the following statements is correct? User data cannot be combined and shared among authorized users. In a nondatabase,
    6·1 answer
  • What are the main differences between openldap and microsoft's active directory (ad)? check all that apply
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!