yes very good observations guys...i'll will work on a better method.
Type: Posts; User: fcommisso
yes very good observations guys...i'll will work on a better method.
oops...
I'm thinking my logic is flawed in the actual swapping of array elements...anyone?
ok, this thread doens't let me show the spaces how they are displayed in the terminal, but take my word for it that the number 15 in the array is originally to the far right and then after scramble...
so this is my newest version of that function. Now it just swaps one element in the array.
so if my original array is:
1 2 3 4
5 6 7 8
9 10 11 12
13 14 ...
yes the array i made manually and does have a zero, else it would be pointless. I guarantee they return a valid position where the ever existant zero appears in the array.
Thanks, I did notice...
here's a sample code I just whipped out to prove my range is indeed form 0 to 3:
#include <stdio.h>
#include <stdlib.h>
int main()
{
Hi, I am working on a project for my C programming class. We have not covered pointers yet, and this project is primarily focused on Arrays mainly.
I have coded most of it but I'm stuck at the...