title: Why is the scanf_s function not taking input correctly?
body: <p>When I input <code>a</code>, the output is <code>not a</code>. Condition is true so why is the output <code>not a</code>?. When I use <code>getchar</code> instead of <code>scanf_s</code>, it works fine. What's the issue?</p>
  
  <pre><code>char op;
  scanf_s("%c", &amp;op);
  if ( op == 'a' )
      printf("the character is a");
  else
      printf("not a");
  </code></pre>