Question: #include #include #include #include #define LIMIT 200 #define RAND_RANGE 95 // 95 printing characters x20-x7E char source[LIMIT]; // array to hold input data values int

#include #include #include #include

#define LIMIT 200 #define RAND_RANGE 95 // 95 printing characters x20-x7E

char source[LIMIT]; // array to hold input data values

int i; // loop variable int j; // loop variable

// return random character char randChar() { // 0 -> x20 -> ' ' // 1 -> x21 -> '!' // ,,, // 94 -> x7E -> '~' // see https://ascii.cl return ((char)((rand() % RAND_RANGE)+0x20)); }

// pick pivot and then sort small and big parts void quicky(char* data, int left, int right) {

// ADD YOUR CODE HERE return;

} }

int main(){

//seed random numbers srand((unsigned)time(NULL));

//initialize source array with random character for (i=0; i

//print out source array in rows of 20 elments printf("Source array: "); for (i=0; i < ((LIMIT/20)+1); i++) { for (j=0; j<20; j++) { if (i*20+j < LIMIT) { printf("%c ",source[i*20+j]); } } printf(" "); } printf(" ");

// do the sorthing quicky(source, 0, LIMIT-1);

//print out sorted array in rows of 10 printf("Destination array: "); for (i=0; i < ((LIMIT/10)+1); i++) { for (j=0; j<10; j++) { if (i*10+j < LIMIT) { printf("%c ",source[i*10+j]); } } printf(" "); } printf(" "); return 0; }

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!