>658
それだと、微妙にバグ有ると思う。

int power(int base, int r)
{
 int ret=1;
 while( r-- > 0)  
  ret *= base;
 return ret;
}

main ()
{
 const char *p="123.40";
 char *pe;
 const char *pr = strchr(p, '.');
 long first = strtol(p,NULL,10) *1000;
 long second=0;
 if( pr )
 {
  pr++;
  second = strtol(pr,&pe,10)*1000;
  second /= power(10,pe - pr) ;
 }
 printf("%d %d",first, second);
}