about summary refs log blame commit diff
path: root/stdio-common/scanf12.c
blob: db37e2fedc930265cbe238685a2576b98293e0b2 (plain) (tree)
1
2
3
4
5
6
7
8
9







                   
                             











                                         
#include <stdio.h>
#include <stdlib.h>

int
main (void)
{
  double d;
  int c;

  if (scanf ("%lg", &d) != 0)
    {
      printf ("scanf didn't failed\n");
      exit (1);
    }
  c = getchar ();
  if (c != ' ')
    {
      printf ("c is `%c', not ` '\n", c);
      exit (1);
    }

  return 0;
}