Question: Write a program which receives two strings: S1 and S2, and an integer 1. String SI is composed of letters (A, B, C, D ...etc)

 Write a program which receives two strings: S1 and S2, and

Write a program which receives two strings: S1 and S2, and an integer 1. String SI is composed of letters (A, B, C, D ...etc) and digits (0 to 9) characters only, while S2 is empty. The function should copy to S2 all the digit characters representing the Ith integer in string Si. Example 1: Example 2: Example 3: Given SI = "abc213fe123djg11dFG4" Given SI - "abc213fe123djg|1dFG Given S1 - "abc213fe123djg11dFG8T" If I is equal to 1 If I is equal to 2 If I is equal to 4 The function should copy "213" to S2 The function should copy "23" to S2 The function should copy "87" into 52 Do not use any ready function except strlen(). You have to write your own code In main do the following: 1. Define necessary strings for the function 2. Read a string and an integer number from user. 3. Call the function. 4. Print the result string. (2 marks)

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!