Question: 1. Write the statements to read two strings s1 and s2 from user input and output the one that comes later in the lexicographic order.

1. Write the statements to read two strings s1 and s2 from user input and output the one that comes later in the lexicographic order.

2. Declare (not define) a function called longer that takes two strings as parameters (without using array notation) and returns the longer string.

3. Write a function removeSpaces that remove all space characters from a given string s1 and stores the result in a second string s2. Your function should have the following prototype:

void removeSpaces (char *s1, char *s2);

4. Complete the code below to print the second to last character of the string mystring.

char mystring[200];

scanf(%s, mystring); /* initialize from standard input */

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!