title: How can I immediately close a program in C?
body: <p>I am writing C code, in which I am analyzing some data. I have set the program to handle only 100 data inputs. When it has more than 100 inputs, it is giving a segmentation fault. I want to create a way so that when the number of inputs is above 100 the user will be warned and the program will terminate. I know how to do it from the main function by simply <code>return 0</code>, however I am multiple function calls away from main and it is difficult to do that even a <code>return 0</code> in this function will keep it looping.</p>
  
  <p>Is there any immediate way to terminate the entire program without being in main?</p>