title: Segmentation fault (core dumped) appears when C code is run on Linux machine
body: <p>If the C code is run on windows machine using visual studio, the segmentation doesnt show up and the output is also as expected. 
  Note: There is lot of usage of pointers in the code for memory allocation and deallocation. The depth of usage of pointers is high (upto 3 levels).<br>
  What could be the problem?? The debugging of C code in gdb is also very difficult as it just shows which function is throwing the seg fault and not the line in the code. </p>