title: Execute C program till Ctrl+C hit in the terminal
body: <p>I am writing a program that repeatedly does an operation till Ctrl+C is hit by the user in the Linux terminal. I am programming in C. Any ideas how i can implement this.</p>
  
  <p>I have tested my program by using "for" loops with a condition but now i want to make it run as long as Ctrl+C is hit by the user and interrupted.</p>
  
  <p>What I was thinking was of writing a do while loop like the following</p>
  
  <p>do{
     /<em>Computation</em>/
  }
  while(Ctrl+C is not hit)</p>
  
  <p>But i dont know how to check for the Ctrl+C input from the user.</p>
  
  <p>Any suggestions will be appreciated.</p>
  
  <p>Thanks</p>