SlideShare una empresa de Scribd logo
1 de 1
Descargar para leer sin conexión
write a C code for this question
Problem 6: Replace All- 25 points Write a C program with a function char * replaceAll(const
char * string, char * target, char * replacement) that replaces all occurrences of the target with
the replacement string and returns a pointer to the resulting string. - Your program should prompt
the user to provide the three input strings. - Your program must be case-sensitive. Example 1:
Enter a string: It's been a wonderfuli day. Enter the target: been Enter replacement: was Output:
It's was a wonderful day. Compiler Code: gcc p6.c-o p6 -std=c18 -pedantic -Wall -Wextra -
Werror Must compile code with no errors or flags, or risk losing all points

Más contenido relacionado

Más de amikoenterprises

William Short is chief executive officer (CEO) of Benton Memorial Ho.pdf
William Short is chief executive officer (CEO) of Benton Memorial Ho.pdfWilliam Short is chief executive officer (CEO) of Benton Memorial Ho.pdf
William Short is chief executive officer (CEO) of Benton Memorial Ho.pdfamikoenterprises
 
Word facilita el formato de texto usando negrita, cursiva y subrayad.pdf
Word facilita el formato de texto usando negrita, cursiva y subrayad.pdfWord facilita el formato de texto usando negrita, cursiva y subrayad.pdf
Word facilita el formato de texto usando negrita, cursiva y subrayad.pdfamikoenterprises
 
wo populations of beetles have different reproductive organs that ar.pdf
wo populations of beetles have different reproductive organs that ar.pdfwo populations of beetles have different reproductive organs that ar.pdf
wo populations of beetles have different reproductive organs that ar.pdfamikoenterprises
 
Wittes Tasty Fishes� Wittes Tasty Fishes� is an aquaculture compan.pdf
Wittes Tasty Fishes� Wittes Tasty Fishes� is an aquaculture compan.pdfWittes Tasty Fishes� Wittes Tasty Fishes� is an aquaculture compan.pdf
Wittes Tasty Fishes� Wittes Tasty Fishes� is an aquaculture compan.pdfamikoenterprises
 
Write the necessary SQL Queries for the following functions.A,Addi.pdf
Write the necessary SQL Queries for the following functions.A,Addi.pdfWrite the necessary SQL Queries for the following functions.A,Addi.pdf
Write the necessary SQL Queries for the following functions.A,Addi.pdfamikoenterprises
 
Write the necessary SQL Queries for the following functions.A. Add.pdf
Write the necessary SQL Queries for the following functions.A. Add.pdfWrite the necessary SQL Queries for the following functions.A. Add.pdf
Write the necessary SQL Queries for the following functions.A. Add.pdfamikoenterprises
 
Write the class named Student which has the following data members.pdf
Write the class named Student  which has the following data members.pdfWrite the class named Student  which has the following data members.pdf
Write the class named Student which has the following data members.pdfamikoenterprises
 
Write program in C language to sort the given array using merge sort.pdf
Write program in C language to sort the given array using merge sort.pdfWrite program in C language to sort the given array using merge sort.pdf
Write program in C language to sort the given array using merge sort.pdfamikoenterprises
 
Write notes on the following areas as related to tax investigations .pdf
Write notes on the following areas as related to tax investigations .pdfWrite notes on the following areas as related to tax investigations .pdf
Write notes on the following areas as related to tax investigations .pdfamikoenterprises
 
Write it in Assembly codeWrite it in Assembly codeWrite it in As.pdf
Write it in Assembly codeWrite it in Assembly codeWrite it in As.pdfWrite it in Assembly codeWrite it in Assembly codeWrite it in As.pdf
Write it in Assembly codeWrite it in Assembly codeWrite it in As.pdfamikoenterprises
 
Write MATLAB code to solve this summation in general, where you can .pdf
Write MATLAB code to solve this summation in general, where you can .pdfWrite MATLAB code to solve this summation in general, where you can .pdf
Write MATLAB code to solve this summation in general, where you can .pdfamikoenterprises
 
William es due�o de un solo barco. El barco vale 200 millones de d�l.pdf
William es due�o de un solo barco. El barco vale 200 millones de d�l.pdfWilliam es due�o de un solo barco. El barco vale 200 millones de d�l.pdf
William es due�o de un solo barco. El barco vale 200 millones de d�l.pdfamikoenterprises
 
write clear explanation please 4. Find the dimension and a basi.pdf
write clear explanation please 4. Find the dimension and a basi.pdfwrite clear explanation please 4. Find the dimension and a basi.pdf
write clear explanation please 4. Find the dimension and a basi.pdfamikoenterprises
 
Write an essay on autonomous vehicle technology. The paper should ad.pdf
Write an essay on autonomous vehicle technology. The paper should ad.pdfWrite an essay on autonomous vehicle technology. The paper should ad.pdf
Write an essay on autonomous vehicle technology. The paper should ad.pdfamikoenterprises
 
Write a C# Method that takes two integer values as parameters. The m.pdf
Write a C# Method that takes two integer values as parameters. The m.pdfWrite a C# Method that takes two integer values as parameters. The m.pdf
Write a C# Method that takes two integer values as parameters. The m.pdfamikoenterprises
 
Write an essay on relatively new technology. For this purpose, ident.pdf
Write an essay on relatively new technology. For this purpose, ident.pdfWrite an essay on relatively new technology. For this purpose, ident.pdf
Write an essay on relatively new technology. For this purpose, ident.pdfamikoenterprises
 
Write all capabilities and skills for an entry level Human Resources.pdf
Write all capabilities and skills for an entry level Human Resources.pdfWrite all capabilities and skills for an entry level Human Resources.pdf
Write all capabilities and skills for an entry level Human Resources.pdfamikoenterprises
 
Write an analysis of Content Management Systems. Why would you choo.pdf
Write an analysis of Content Management Systems.  Why would you choo.pdfWrite an analysis of Content Management Systems.  Why would you choo.pdf
Write an analysis of Content Management Systems. Why would you choo.pdfamikoenterprises
 
Write all capabilities and skills for a Human Resources Assistant po.pdf
Write all capabilities and skills for a Human Resources Assistant po.pdfWrite all capabilities and skills for a Human Resources Assistant po.pdf
Write all capabilities and skills for a Human Resources Assistant po.pdfamikoenterprises
 
Write a VHDL source code to implement the hardware of the sequencers.pdf
Write a VHDL source code to implement the hardware of the sequencers.pdfWrite a VHDL source code to implement the hardware of the sequencers.pdf
Write a VHDL source code to implement the hardware of the sequencers.pdfamikoenterprises
 

Más de amikoenterprises (20)

William Short is chief executive officer (CEO) of Benton Memorial Ho.pdf
William Short is chief executive officer (CEO) of Benton Memorial Ho.pdfWilliam Short is chief executive officer (CEO) of Benton Memorial Ho.pdf
William Short is chief executive officer (CEO) of Benton Memorial Ho.pdf
 
Word facilita el formato de texto usando negrita, cursiva y subrayad.pdf
Word facilita el formato de texto usando negrita, cursiva y subrayad.pdfWord facilita el formato de texto usando negrita, cursiva y subrayad.pdf
Word facilita el formato de texto usando negrita, cursiva y subrayad.pdf
 
wo populations of beetles have different reproductive organs that ar.pdf
wo populations of beetles have different reproductive organs that ar.pdfwo populations of beetles have different reproductive organs that ar.pdf
wo populations of beetles have different reproductive organs that ar.pdf
 
Wittes Tasty Fishes� Wittes Tasty Fishes� is an aquaculture compan.pdf
Wittes Tasty Fishes� Wittes Tasty Fishes� is an aquaculture compan.pdfWittes Tasty Fishes� Wittes Tasty Fishes� is an aquaculture compan.pdf
Wittes Tasty Fishes� Wittes Tasty Fishes� is an aquaculture compan.pdf
 
Write the necessary SQL Queries for the following functions.A,Addi.pdf
Write the necessary SQL Queries for the following functions.A,Addi.pdfWrite the necessary SQL Queries for the following functions.A,Addi.pdf
Write the necessary SQL Queries for the following functions.A,Addi.pdf
 
Write the necessary SQL Queries for the following functions.A. Add.pdf
Write the necessary SQL Queries for the following functions.A. Add.pdfWrite the necessary SQL Queries for the following functions.A. Add.pdf
Write the necessary SQL Queries for the following functions.A. Add.pdf
 
Write the class named Student which has the following data members.pdf
Write the class named Student  which has the following data members.pdfWrite the class named Student  which has the following data members.pdf
Write the class named Student which has the following data members.pdf
 
Write program in C language to sort the given array using merge sort.pdf
Write program in C language to sort the given array using merge sort.pdfWrite program in C language to sort the given array using merge sort.pdf
Write program in C language to sort the given array using merge sort.pdf
 
Write notes on the following areas as related to tax investigations .pdf
Write notes on the following areas as related to tax investigations .pdfWrite notes on the following areas as related to tax investigations .pdf
Write notes on the following areas as related to tax investigations .pdf
 
Write it in Assembly codeWrite it in Assembly codeWrite it in As.pdf
Write it in Assembly codeWrite it in Assembly codeWrite it in As.pdfWrite it in Assembly codeWrite it in Assembly codeWrite it in As.pdf
Write it in Assembly codeWrite it in Assembly codeWrite it in As.pdf
 
Write MATLAB code to solve this summation in general, where you can .pdf
Write MATLAB code to solve this summation in general, where you can .pdfWrite MATLAB code to solve this summation in general, where you can .pdf
Write MATLAB code to solve this summation in general, where you can .pdf
 
William es due�o de un solo barco. El barco vale 200 millones de d�l.pdf
William es due�o de un solo barco. El barco vale 200 millones de d�l.pdfWilliam es due�o de un solo barco. El barco vale 200 millones de d�l.pdf
William es due�o de un solo barco. El barco vale 200 millones de d�l.pdf
 
write clear explanation please 4. Find the dimension and a basi.pdf
write clear explanation please 4. Find the dimension and a basi.pdfwrite clear explanation please 4. Find the dimension and a basi.pdf
write clear explanation please 4. Find the dimension and a basi.pdf
 
Write an essay on autonomous vehicle technology. The paper should ad.pdf
Write an essay on autonomous vehicle technology. The paper should ad.pdfWrite an essay on autonomous vehicle technology. The paper should ad.pdf
Write an essay on autonomous vehicle technology. The paper should ad.pdf
 
Write a C# Method that takes two integer values as parameters. The m.pdf
Write a C# Method that takes two integer values as parameters. The m.pdfWrite a C# Method that takes two integer values as parameters. The m.pdf
Write a C# Method that takes two integer values as parameters. The m.pdf
 
Write an essay on relatively new technology. For this purpose, ident.pdf
Write an essay on relatively new technology. For this purpose, ident.pdfWrite an essay on relatively new technology. For this purpose, ident.pdf
Write an essay on relatively new technology. For this purpose, ident.pdf
 
Write all capabilities and skills for an entry level Human Resources.pdf
Write all capabilities and skills for an entry level Human Resources.pdfWrite all capabilities and skills for an entry level Human Resources.pdf
Write all capabilities and skills for an entry level Human Resources.pdf
 
Write an analysis of Content Management Systems. Why would you choo.pdf
Write an analysis of Content Management Systems.  Why would you choo.pdfWrite an analysis of Content Management Systems.  Why would you choo.pdf
Write an analysis of Content Management Systems. Why would you choo.pdf
 
Write all capabilities and skills for a Human Resources Assistant po.pdf
Write all capabilities and skills for a Human Resources Assistant po.pdfWrite all capabilities and skills for a Human Resources Assistant po.pdf
Write all capabilities and skills for a Human Resources Assistant po.pdf
 
Write a VHDL source code to implement the hardware of the sequencers.pdf
Write a VHDL source code to implement the hardware of the sequencers.pdfWrite a VHDL source code to implement the hardware of the sequencers.pdf
Write a VHDL source code to implement the hardware of the sequencers.pdf
 

Último

4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 

Último (20)

4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 

C code to replace all occurrences of a target string

  • 1. write a C code for this question Problem 6: Replace All- 25 points Write a C program with a function char * replaceAll(const char * string, char * target, char * replacement) that replaces all occurrences of the target with the replacement string and returns a pointer to the resulting string. - Your program should prompt the user to provide the three input strings. - Your program must be case-sensitive. Example 1: Enter a string: It's been a wonderfuli day. Enter the target: been Enter replacement: was Output: It's was a wonderful day. Compiler Code: gcc p6.c-o p6 -std=c18 -pedantic -Wall -Wextra - Werror Must compile code with no errors or flags, or risk losing all points