Question: Write progeam about sort word with C + + : 1 . Write all programs in cross - platform C + + 2 . No
Write progeam about sort word with C:
Write all programs in crossplatform C
No Containers, NO STL allowed Vector Lists, Sets, etc...
Simple Oldfashion C No modern C
No Adding files
SortStrings.h
#ifndef SORTSTRINGSH
#define SORTSTRINGSH
Leave this two functions signature... used in unit test
DO NOT MODIFY
void ReorderAlphabeticalconst char const inString, char const outString ;
void ReorderWordLengthconst char const inString, char const outString ;
add sorting help functions hereif You want
#endif
End of File
SortStrings.cpp
#include "SortStrings.h
void ReorderAlphabeticalconst char const inString, char const outString
reorder the words in the string, words are separated with spaces
sort words on alphabetical order, a begin, z end
you don't know how many words
if dynamically create any buffers inside this routine, clean them up
use strtoks and strcats in your answer
YOU need to use qsort might be a good function to know
don't use strcpy strtok, strcat, etc...MUST USE strcpys strtoks strcats etc...
TODO
void ReorderWordLengthconst char const inString, char const outString
reorder the words in the string, words are separated with spaces
sort words on their word length order, short longest
you don't know how many words
if dynamically create any buffers inside this routine, clean them up
use strtoks and strcats in your answer
You need to use qsort might be a good function to know
don't use strcpy strtok, strcat, etc...MUST USE strcpys strtoks strcats etc...
TODO
End of File
Please check the annotated comments carefully and complete the code.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
