title: the code here works perfectly in codeblocks but in codechef IDE it gives SIGTSTP (runtime error and shows a lot of 0s in the output)
body: <p>LINK TO QUESTION : <a href="https://www.codechef.com/problems/LUCKFOUR" rel="nofollow noreferrer">https://www.codechef.com/problems/LUCKFOUR</a></p>
  <pre><code>#include &lt;stdio.h&gt;     
  #include&lt;stdlib.h&gt;
  
  int main() {
  
      int T,ans;
      scanf(&quot;%d&quot;,&amp;T);
  
      while(T) {
          int num,count = 0;
          scanf(&quot;%d&quot;,&amp;num);
  
          while(num) {
              ans = num % 10;
              num = num/10;
              if( ans == 4) {
                  count++;
              }
          }
          printf(&quot;%d\n&quot;,count);
          T--;
      }
      return 0;
  }
  </code></pre>
  <p>Runs normally for codeblocks:it takes T first and then takes input from the user and prints the no. of 4s in that input and repeats the process of taking inputs and printing out the no. of 4s T times</p>