Question: #include void cntSort(unsigned m, unsigned n, unsigned data[]) { int i; unsigned temp[m]; unsigned *count; /* allocate memory */ count = (unsigned *)malloc(sizeof(unsigned) * m);

#include

void cntSort(unsigned m, unsigned n, unsigned data[]) {

int i;

unsigned temp[m]; unsigned *count;

/* allocate memory */ count = (unsigned *)malloc(sizeof(unsigned) * m); for (i=0;i

for(i=0; i

for(i=0; i

I get this error in my program when I run it, and I don't know why

./cntSort -m 64 -n 1048676 -s2018 m 64, n 1048676, seed 2018 quicksort takes 78.00 msec

Segmentation fault

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!