title: ignoring return value (C Programming)
body: <p>I just started learning C programming a few days back and I'm trying out some problems from the Kattis (open.kattis.com) website. I came up with this problem along the way where I don't really understand what it means. </p>
  
  <pre><code>//two stones
  
  #include &lt;stdio.h&gt;
  
  int main()
  { 
  int n,x=2;
  
  printf("The number of stones placed on the ground is ");
  scanf("%d",&amp;n);
  
  if (n%x != 0)
  {
      printf("The winner of the game is Alice! \n");
  }
  else
  {
      printf("The winner of the game is Bob! \n");
  }
  return 0;
  }
  </code></pre>
  
  <p>This appeared >> </p>
  
  <blockquote>
    <p>warning: ignoring return value of scanf, declared with attribute warn_unused_result [-Wunused-result]
    regarding scanf("%d",&amp;n);</p>
  </blockquote>
  
  <p>Can anyone explain what's wrong with this and how to rectify this problem? Thanks.</p>