OK_RECUR.C
资源名称:C.rar [点击查看]
上传用户:qq5388545
上传日期:2022-07-04
资源大小:29849k
文件大小:0k
源码类别:
界面编程
开发平台:
C/C++
- #include <stdio.h>
- #include <time.h>
- int string_length(const char *str)
- {
- if (*str)
- return(1 + string_length(str+1));
- else
- return(0);
- }
- void main(void)
- {
- long int counter;
- time_t start_time, end_time;
- time(&start_time);
- for (counter = 0; counter < 100000L; counter++)
- string_length("Jamsa's 1001 C/C++ Tips");
- time(&end_time);
- printf("Processing time %dn", end_time - start_time);
- }