aboutsummaryrefslogtreecommitdiff
path: root/stdio-common/scanf12.c
blob: b55778537708e23af072b866f4f364495553a61b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
#include <stdlib.h>

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

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

  return 0;
}