Hi,
I'm running a simulation over time and I'm having trouble with arrays in my C program. An array element that has been initialized to zero suddenly changes value to 13 after a few time points, and surprisingly, this only happens in some runs. If I print out values from different parts of the program, I can clearly see the value changing.
I am not using dynamic memory allocation, so I'm not sure why I see this strange behavior. Has anybody seen such behavior before and do you have any idea what could be causing the problem?
I am stuck at this point and I'm not sure how to proceed. Any suggestions/advice will be greatly appreciated.
I'm running a simulation over time and I'm having trouble with arrays in my C program. An array element that has been initialized to zero suddenly changes value to 13 after a few time points, and surprisingly, this only happens in some runs. If I print out values from different parts of the program, I can clearly see the value changing.
I am not using dynamic memory allocation, so I'm not sure why I see this strange behavior. Has anybody seen such behavior before and do you have any idea what could be causing the problem?
I am stuck at this point and I'm not sure how to proceed. Any suggestions/advice will be greatly appreciated.
Comment