title: Why is this trivial C program detected as a Virus?
body: <p>I wrote this program:</p>
  <pre><code>#include &lt;stdio.h&gt;
  
  main()
  {
    int n;
    n=1;
    while (n&gt;0)
    {
      puts(&quot;Write a number: &quot;);
      scanf(&quot; %d&quot;,&amp;n);
      printf(&quot;This is the number you wrote: %d\n&quot;, n);
    }
  
  }
  </code></pre>
  <p>Apparently there are absolutely no syntax errors, nor any compilation error. It compiled and built perfectly.</p>
  <p>Now, if I switch this line:</p>
  <pre><code>puts(&quot;Write a number: &quot;);
  </code></pre>
  <p>with this one:</p>
  <pre><code>printf(&quot;Write a number: &quot;);
  </code></pre>
  <p>it compiles with no errors but when the compiled object launches, it immediately stops and an anti-virus warning pops up saying it identified a trojan horse. Before taking any conclusions, I built it several times and after getting the same message I scanned it in virustotal.com and <a href="https://www.virustotal.com/pt/file/54c695f6636a166570e794282d293d0d710726b57e27f5f834744e1e584a6735/analysis/1382101391/" rel="nofollow noreferrer">this</a> was the result.</p>
  <p>Well I know <code>puts</code> is actually more correct than <code>printf</code> given the objective, but still it should work just fine.</p>
  <p>What's wrong here?</p>
  <p>I'm using AVG anti-virus, and Pelles C to compile.</p>