No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi, I found this code for shuffle one-dimensional int array somewhere: [CODE]void shuffle(int *array, size_t n) { if (n > 1) { size_t i; for (i = 0; i < n - 1; i++) { size_t j = i + rand() / (RAND_MAX / (n - i) + 1); int … | |
Hi, I'm using fgets() to read lines of text file and display them. The fgets() is in an infinite loop. The problem occurs when I remove lines from text file while program is running. The lines count is correct, but the program display the old content of the file up … |