[ create a new paste ] login | about

Link: http://codepad.org/5Bnb06vj    [ raw code | fork ]

C, pasted on Mar 25:
#include <stdio.h>
#include <stdlib.h> 

void sort (int *oldarray, int *newarray, int length)
{
  // do your stuff, and put result in newarray
}

int main()
{
  int length = 7;
  int oldarray[length];
  int newarray[length];

  // here would be a loop that populates the oldarray

  sort(oldarray, newarray, length);

  // a loop that prints the newarray from the sort or main function

  return 0;
}


Output:
No errors or program output.


Create a new paste based on this one


Comments: