title: error C4996: 'scanf': This function or variable may be unsafe in c programming
body: <p>I have created a small application to find max number by using user-defined function with parameter.  When I run it, it shows this message  </p>
  
  <blockquote>
    <p>Error 1   error C4996: 'scanf': This function or variable may be unsafe.
    Consider using scanf_s instead. To disable deprecation, use
    _CRT_SECURE_NO_WARNINGS. See online help for details.</p>
  </blockquote>
  
  <p>What do I do to resolve this? </p>
  
  <p>This is my code </p>
  
  <pre><code>#include&lt;stdio.h&gt;
  
  void findtwonumber(void);
  void findthreenumber(void);
  
  int main() {
      int n;
      printf("Fine Maximum of two number\n");
      printf("Fine Maximum of three number\n");
  
      printf("Choose one:");
      scanf("%d", &amp;n);
      if (n == 1)
      {
          findtwonumber();
      }
      else if (n == 2)
      {
          findthreenumber();
      }
      return 0;
  }
  
  void findtwonumber(void)
  {
      int a, b, max;
      printf("Enter a:");
      scanf("%d", &amp;a);
      printf("Enter b:");
      scanf("%d", &amp;b);
      if (a&gt;b)
          max = a;
      else
          max = b;
      printf("The max is=%d", max);
  }
  
  void findthreenumber(void)
  {
      int a, b, c, max;
      printf("Enter a:");
      scanf("%d", &amp;a);
      printf("Enter b:");
      scanf("%d", &amp;b);
      printf("Enter c:");
      scanf("%d", &amp;c);
      if (a&gt;b)
          max = a;
      else if (b&gt;c)
          max = b;
      else if (c&gt;a)
          max = c;
      printf("The max is=%d", max);
  }
  </code></pre>