Skip to content

Instantly share code, notes, and snippets.

@juzna
Created January 26, 2012 19:37
Show Gist options
  • Save juzna/1684610 to your computer and use it in GitHub Desktop.
Save juzna/1684610 to your computer and use it in GitHub Desktop.
sscanf
#include <stdio.h>
int main (int argc, char **argv) {
char str[] = "image%06d.png", buf[100];
int num;
sscanf (str,"%s", buf);
printf ("%s\n", buf);
return 0;
}
/*
juzna@juzna-pc:/tmp$ gcc tst.c && ./a.out
image%06d.png
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment