You should use [code]...[/code] tags around your code
Where do you think I am going wrong ?
mlock.c is not part of Qt. Run your code in your debugger until it crashes and then look at the backtrace to find the offending part of your code.
You add byte differences to an array called alpha then print an array called z.
//x and y are read from files created using the above
To copy to clipboard, switch view to plain text mode
You then add byte sums to the array called alpha then print the array called beta.
Neither debug output is likely to be what you expect.
Also, you second loop is bounds are set based x and alpha size but you are using them to index an unrelated z which is probably empty or, if not, smaller than either x or alpha. Out-of-bounds memory accesses are a recipe for program termination.