Back to index

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

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 5 of file scanf5.c.

{
  int a, b;

  a = b = -1;
  sscanf ("12ab", "%dab%n", &a, &b);
  printf ("%d, %d\n", a, b);
  if (a != 12 || b != 4)
    abort ();

  a = b = -1;
  sscanf ("12ab100", "%dab%n100", &a, &b);
  printf ("%d, %d\n", a, b);
  if (a != 12 || b != 4)
    abort ();
  return 0;
}

Here is the call graph for this function: