Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started