
C函数
snail李
哈人
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
2020-12-02结构体c语言
oo:面向对象object oriented class:类 结构体数据类型:用户自定义数据类型 定义struct struct student { long ID; char SEX; int score[N]; }; //声明结构体模版 student是结构体名 struct student stu1; //定义一个具有struct student类型的结构体变量stu1 下面这种情况是等价的 struct student { long ID; char SEX; int score[N];.原创 2022-03-21 18:48:16 · 144 阅读 · 0 评论 -
C语言 -预定义宏
C语言 -预定义宏 以字符串的形式 输出当时的时间与文件位置等等 #include <stdio.h> int main() { printf("File :%s\n", __FILE__ ); printf("Date :%s\n", __DATE__ ); printf("Time :%s\n", __TIME__ ); printf("Line :%d\n", __LINE__ ); printf("ANSI :%d\n", __STDC__ );原创 2021-09-29 19:11:54 · 157 阅读 · 0 评论 -
C语言-程序耗费时间函数
C语言-程序耗费时间函数 #include <stdio.h> #include <time.h> //clock()函数,捕捉从程序开始运行到clock()被调用所耗费的时间 //时间单位是clock tick //时间常数为CLK_TCK(机器时钟每秒走过的时钟打点数) clock_t start,stop; double duration; int main () { start=clock(); /* 代码运行的内容 */ stop原创 2021-09-27 17:20:50 · 488 阅读 · 0 评论