Question: You will write code to manipulate strings using pointers but without using the string handling functions in string.h. Do not include string.h in your code.
You will write code to manipulate strings using pointers but without using the string handling functions in string.h. Do not include string.h in your code.
1. You will read in two strings from a file cp4in_1.txt at a time (there will be 2n strings, and you will read them until EOF) and then do the following. You alternately take characters from the two strings and string them together and create a new string which you will store in a new stringvariable. You may assume that each string is no more than 20 characters long (not including the null terminator), but can be far less. Yo must use pointers. You may store each string in an array, but are not allowed to treat the string as a character array in the sense that you may not have statements like c[i] = a[j], but rather *c = *a is allowed. Please use pointers.
Example
String1: ABCDE
String2: PQRST
Output: APBQCRDSET
BELOW IS cp4in_1.txt
ABCDE PQRSTFG acegikmoqsuwyz bdfhjlnprtvx
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
