Skip to content

Instantly share code, notes, and snippets.

@cammckinnon
Created November 1, 2011 04:02
Show Gist options
  • Save cammckinnon/1329879 to your computer and use it in GitHub Desktop.
Save cammckinnon/1329879 to your computer and use it in GitHub Desktop.
/* sscanf example */
#include <stdio.h>
int main ()
{
char sentence []="Rudolph is 15 years old";
char str [20];
int i;
sscanf (sentence,"%s is %d",str,&i);
printf ("%s -> %d\n",str,i);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment