Define a function to input a list of names and store them as dynamically-allocated strings in an array,
and a function to output them:
void ReadNames (char *names[], const int size);
void WriteNames (char *names[], const int size);
Write another function which sorts the list using bubble sort:
void BubbleSort (char *names[], const int size);
Bubble sort involves repeated scans of the list, where during each scan adjacent items are compared
and swapped if out of order. A scan which involves no swapping indicates that the list is sorted.
1
Expert's answer
2015-07-03T03:10:04-0400
#include <iostream>
using namespace std;
// The function prototypes void ReadNames(char *names[], const int size); void WriteNames(char *names[], const int size); void BubbleSort(char *names[], const int size);
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment