What does space in scanf mean?

Viewed 11771
#include <stdio.h>
int main(int argc, char* argv[]) {
  char c;
  scanf(" %c", &c);
  printf("%c\n", c);
  return 0;
}

[root@test]# ./scanf 
a
a

[root@test]# ./scanf 
 h
h

It seems always matching whether space exists,why?

6 Answers
Related