Question: (a) Write down a C function to insert a given string at a given position of another string. The function should have the following prototype:

 (a) Write down a C function to insert a given string

(a) Write down a C function to insert a given string at a given position of another string. The function should have the following prototype: void insert (char * dst, char * src, int pos) The function inserts the string src at the position pos of the string dst. The substring of dst starting from pos to the end of dst may need to be shifted right to create space for the input string. The value of pos will be between 0 and n where n is the length of the string dst. You can assume that the dst string will have sufficient memory. See the sample inputs/outputs given below. Sample output HelloWorld Sample input Hello World 51 Bangdesh la 4 Bangladesh

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!