[Solved]Need Code Written C Given Code Include Include Using Namespace Std Char Flipcase Char Void Q37110920
Need this Code written in C:
Given Code:
#include<stdio.h>#include<ctype.h>//using namespace std;char* flipCase(char*);void removeBlanks(char*,char*);void replaceChar(char*,char*,char,char);int main(){charsrc[100],src1[100],dest[100],dest1[100],*dest2,c1,c2;printf(“Enter the string for remove blanks and replacecharacter functions”);gets(src);printf(“Enter the string for flip case function”);gets(src1);printf(“enter character to replace”);scanf(“%c”,&c1);printf(“enter replacement charactern”);scanf(“%c”,&c2);printf(“%c”,c2);removeBlanks(src,dest);printf(“1.removeBlanksn”);printf(“remove all blanks in “);puts(src);printf(“is “);puts(dest);printf(“2.replaceCharn”);printf(“replace all %c’s in “,c1);puts(src);printf(“with %c’s”,c2);replaceChar(src,dest1,c1,c2);puts(dest1);printf(“3flipCasen”);printf(“Orignal String is “);puts(src1);printf(“Flipped case String is “);dest2=flipCase(src1);puts(dest2);
printf(“%s”,dest1);printf(“%s”,src);printf(“xys”);printf(“%s”,dest);}char* flipCase(char *src){int i;char dest[100];for(i=0;*(src+i)!=”;i++){ if(isupper(*(src+i)))*(dest+i)=toupper(*(src+i));else*(dest+i)=tolower(*(src+i));}*(dest+i)=”;return &dest; }void removeBlanks(char *src,char *dest1){int i;int j=0;for(i=0;*(src+i)!=”;i++){if(*(src+i)!=’ ‘){*(dest1+j)=*(src+i);j++;}}*(src+i)=*(dest1+j);}void replaceChar(char *src,char *dest,char c1,char c2){int i,j=0;for(i=0;*(src+i)!=”;i++){if(*(src+i)==c1)*(dest+i)=c2;else*(dest+i)=*(src+i);}}
—–
Need this fixed and implemented please and thanks
Page < 1. Remove, Replace, Flip For this program you will implement the following utility functions. void removeBlanks(char “src, char “dest); void replaceChar(char ‘sre, char oldChar, char newChar); char AipCase(const char “sre); Please read the description of these functions carefully. In the removeBlanks function you will implement a routine that takes a string in as src and outputs the same string into dest but removing any blank space character encountered. For example, if the sre is “Hel lo Wor ld!”, this function should store the value “Hel- loWorld” via the dest pointer In the replaceChar function your function should operate much like a find and replace operation in a word processor works, meaning that the function will replace any instance of the character oldChar and replace it with the character newChar. For example, for a sre string “Hel lo Wor ld, if oldChar is ‘o’ and newChar is ‘e’, then sre is modified as “Hel le Wer ld!” In the flipCase function the function turns each lowercase character into an uppercase character and each uppercase character into a lowercase character. You are allowed to use tolower) and toupper() functions For example, if the sre string is “GNU Image Processing Tool-Kit”, then this function should return a string “gnu iMAGE pROCESSING tOOL-kIT In your main function, you should prompt the user for a string to use for the first two functions, and a string to use for the third function. The user should be allowed to enter any string including ones with white spaces as input. You should also prompt the user for a charactet to replace and a replacement character for the replaceChar function. You may assume that any input string will be at maximum 100 characters 80 MacBook Air Page < Sample output from the program: Enter string for remove blanks and replace char function functions: Hel lo Wor idl Enter string for flip case function: GNU Imago Processing Tool-Kit Entor character to replace: Enter replacemont character: 1. removeBlanks Remove all blanks in Hol lo Wor ld! is Holloworld! 2 roplacoChar Replaco all to’s in Hol lo Wor 1dl with fo’s is 8: Hol lo Wor ld! 3. flipCase Original ntring Le: GNU Image Procossing Tool-Kit Flipped case ธtring io: gnu ¡MAGE PROCESSING tOOL-kIT 80 Show transcribed image text Page
Expert Answer
Answer to Need this Code written in C:Given Code:#include#include//using namespace std;char* flipCase(char*);void removeBlanks(cha… . . .
OR

