/* ----------------------------------------------------------------------------- Prints a symbol table. If sorted output is requested but there is insufficent memory then unsorted output results. Returns: (int) 1 if table is output as requested 0 if memory for sorted table could not be allocated. ----------------------------------------------------------------------------- */ bool HashTable::print(FILE *fp, bool sortFlag) { if (sortFlag) { if (!printSorted(fp)) printUnsorted(fp); else return true; } else printUnsorted(fp); return false; }
int main(){ int arr[] = {10, 12, 20, 30, 25, 40, 32, 31, 35, 50, 60}; int arr_size = sizeof(arr)/sizeof(arr[0]); printUnsorted(arr, arr_size); getchar(); return 0; }
int main() { int arr[] = {0, 1, 15, 25, 6, 7, 30, 40, 50}; int arr_size = sizeof(arr)/sizeof(arr[0]); printUnsorted(arr, arr_size); //getchar(); return 0; }
int main(){ int arr[] = {10,12,20,30,25,40,32,31,35,50,60}; // int arr[] = {0,1,15,25,6,7,30,40,50}; int size = sizeof(arr)/sizeof(arr[0]); printUnsorted(arr,size); return 0; }