1 2 3 4 5 6 7 8 9
#include <stdio.h> extern char buf1[]; int main(int argc, char **argv) { char q[10], buf1[10]; sscanf(q,"%[.0-9]",buf1); return 1; }