int  scanf ( const char * format [ , argument , ...] );

مثال :

int n;
scanf ("%d",&n);

در عبارت گرفت اسكن اف آدرس محلي از حافظه اشاره مي شود كه قرار است مقدار n در آنجا ذخيره شود .

مثال كاملتر :

/* scanf example */
#include <stdio.h>

int main ()
{
  char str [80];
  int i;

  printf ("Enter your surname: ");
  scanf ("%s",str);  
  printf ("Enter your age: ");
  scanf ("%d",&i);
  printf ("Mr. %s , %d years old.\n",str,i);
  printf ("Enter a hexadecimal number: ");
  scanf ("%x",&i);
  printf ("You have entered %#x (%d).\n",i,i);
  
  return 0;
}

This example demonstrates some of the types that can be read with scanf:
Enter your surname: Soulie
Enter your age: 23
Mr. Soulie , 23 years old.
Enter a hexadecimal number: ff
You have entered 0xff (255).