Question: C program gcc compiler dont use conio.h we must store the list of strings as a linked list of strings, each put in a struct

C program gcc compiler dont use conio.h

we must store the list of strings as a linked list of strings, each put in a struct object

struct String {

char *s;

struct String *next;

}

struct String *list;

Input: A list of strings, separated by a semicolon, ending by EOF. Please note that: Some strings have new line ( <> ) Output:The list of strings in the ascending order of size of strings, separated by a new line ( <> )

The code must implement the following functions:

void get_strings(struct String *list): the function reads from stdin a list of strings and put them in the linked list list

void sort_strings(struct String *list): this function is to ascendingly sort strings placed list

void show_strings(struct String *list): this function prints the strings stored list to stdout

sample input: abc;def;1234;12

output:

12 abc def 1234 

sample input: ;;;;

output:

   

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!