There is a weird segmentation fault error. The following code runs fine
#include
#include
main()
{
int matrixSize = 100
You are exceeding the stack size most likely.
In the terminal you are using to run this, try typing
ulimit -s unlimited
and re-run, assuming you are on a Linux system using bash (or sh).
If you have to use arrays that size, you can make them dynamic so they are on the heap rather than the stack if changing the stack size is problematic for some reason.