18 lines
363 B
C
18 lines
363 B
C
|
#include <stdio.h>
|
|||
|
#include <stdlib.h>
|
|||
|
|
|||
|
int main()
|
|||
|
{
|
|||
|
char str[30] = "-20.30300 This is test";
|
|||
|
char *ptr;
|
|||
|
double ret;
|
|||
|
int i = 0;
|
|||
|
ret = strtod(&str[4], &ptr);
|
|||
|
int len = ptr - &str[i];
|
|||
|
printf("<EFBFBD>Ʀr<EFBFBD>]double<6C>^<5E>O %f\n", ret);
|
|||
|
printf("<EFBFBD>r<EFBFBD>Ŧ곡<EFBFBD><EFBFBD><EFBFBD>O |%s|\n", ptr);
|
|||
|
printf("len =%d ,&ptr=%d ,&str[i]=%d ", len ,&ptr ,&str[i]);
|
|||
|
|
|||
|
return(0);
|
|||
|
}
|