run code, runtime error
Runtime error stack smashing detected
@RishabhSingh
You have declared 2-D array c with size 2*100 (100 defined explicitly while 2 comes from initialisation) .
Since your array size is 2 , the only indices you can access are 0 and 1. Since you are trying to access index 2 , it gives a runtime error.
Take a look at this slightly modified code for a better understanding - https://ide.codingblocks.com/s/114120