Back to index

glibc  2.9
Functions
scanf12.c File Reference
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

int main (void)

Function Documentation

int main ( void  )

Definition at line 5 of file scanf12.c.

{
  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;
}

Here is the call graph for this function: