Your main array is twice as long as the resulting two. There might be 2 or 3 design errors in your code depending on what your data are
1rst flaw is that you use the same index for all the arrays at the same time. So you skip a memory cell on each pass of your for
either for your even or your odd array and since your limit is the size of your even array, you only go halfway through your main array.
2nd flaw is that, depending of your data, you may need a different size for your even and odd array because if you have 46 odd numbers and 20 even numbers you still get your arrays size of 33 for each one
3rd flaw and probably most critical : combining the first and second flaw, you most certainly get an index out of bound exception. If you have 25 even number and 67 odd numbers, since you use the same index, your code will work until you get to index >= 25
where you will get an index out of bound, since even array has a last index of 32.
I would also suggest that you use lists instead of arrays since they are designed to store any number of data.
Here's how you could write your code to avoid those flaws :
byte[] array = File.ReadAllBytes("PST_Sample.pst");
List<byte> even = new List<byte>();
List<byte> odd = new List<byte>();
for (int index = 0; index < array.Length; index++)
{
if ((array[index] % 2) == 0)
{
even.Add(array[index]);
}
else
{
odd.Add(array[index]);
}
}
File.WriteAllBytes("even_file.pst", even.ToArray());
File.WriteAllBytes("odd_file.pst", odd.ToArray());