Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2 (Strings) (10 marks) Write a C program which receives two strings: S1 and S2, and an integer I. String S1 is composed of

image text in transcribed

Question 2 (Strings) (10 marks) Write a C program which receives two strings: S1 and S2, and an integer I. String S1 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 3: Given S1 = abc213fet23djg11dFG4 Example 2: Given S1 = abc213fet23djg11dFG4 If I is equal to 2 The function should copy 23 to S2 If I is equal to 1 Given S1 = abc213fet23djg11dFG87" If I is equal to 4 The function should copy 87 into S2 The function should copy 213 to S2 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions

Question

1. How does Kiwi Experience maintain a continual customer focus?

Answered: 1 week ago