My program is supposed to read numbers from a .txt or .bin file and then print them into the opposite file type. When running the program, command line is ./programname -x file1 file2 (where x is -t...
Type: Posts; User: switchback
My program is supposed to read numbers from a .txt or .bin file and then print them into the opposite file type. When running the program, command line is ./programname -x file1 file2 (where x is -t...
Sorting won't work correctly now, turning off the recursion, all it does is take the last value in the array and move it to the first, regaurdless of if it's larger or not. The wrong direction of the...
Figured it out, didn't remove the b[] from an earlier idea.
The goal is to have the user input the amount of numbers they want sorted, then the numbers themself. This part works fine.
The sorting idea is to take the largest value, move it to the last value...
what I changed so far, now I get segmentation fault
From what I gather it's using memory that I have not defined, just not sure what's causing it.
#include <stdio.h>
#define N 10
int...
The goal of this program is to make the function selection_sort, and when it's called have it search the array to find the largest element, then move it to the last position in the array, and finally...