C Program crashes after compiling without error

I'm heaving trouble with a C Program that I'm writing to simulate a Multi-Layer Neural Network. It compiles without any issues, but when I run it, it crashes instantanously. I would be very thankful if anyone could give me a hint. The code is below: