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++:
1. Write all programs in cross-platform C++
2. No Containers, NO STL allowed {Vector, Lists, Sets, etc...}
3. Simple Old-fashion C++. No modern C++
4. No Adding files
//1. SortStrings.h
#ifndef SORT_STRINGS_H
#define SORT_STRINGS_H
// Leave this two functions signature... used in unit test
//--- DO NOT MODIFY ---
void ReorderAlphabetical(const char * const inString, char * const outString );
void ReorderWordLength(const char * const inString, char * const outString );
// add sorting help functions here(if You want)
#endif
//--- End of File ---
//2. SortStrings.cpp
#include "SortStrings.h"
void ReorderAlphabetical(const char * const inString, char * const outString )
{
//1) reorder the words in the string, words are separated with spaces
//2) sort words on alphabetical order, (a begin, z end)
//3) you don't know how many words
//4) if dynamically create any buffers inside this routine, clean them up
//5) use strtok_s and strcat_s in your answer
//6) YOU need to use qsort()- might be a good function to know
//7) don't use strcpy, strtok, strcat, etc...MUST USE strcpy_s, strtok_s, strcat_s, etc...
// TODO
}
void ReorderWordLength(const char * const inString, char * const outString )
{
//1) reorder the words in the string, words are separated with spaces
//2) sort words on their word length order, (short, longest)
//3) you don't know how many words
//4) if dynamically create any buffers inside this routine, clean them up
//5) use strtok_s and strcat_s in your answer
//6) You need to use qsort()- might be a good function to know
//7) don't use strcpy, strtok, strcat, etc...MUST USE strcpy_s, strtok_s, strcat_s, 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 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!