
C语言开发
C语言
雨中来客
一枚普通的嵌入式软件开发工程师,10年优快云菜鸟,喜欢瞎折腾,热衷走弯路,一起共勉。
展开
-
[C语言]自己实现sprintf,printf函数
自己实现sprintf,printf函数原创 2024-07-25 11:43:53 · 1080 阅读 · 0 评论 -
C语言计算程序段执行时长
程序段:#include <stdio.h>#include <sys/time.h>int main(int argc,char * argv[]){ int us = 0; struct timeval start, end; gettimeofday(&start, NULL); usleep(1000*1000+234*1000); gettimeofday(&end, NULL); if(end.t原创 2020-05-20 23:11:31 · 438 阅读 · 0 评论 -
C语言预预处理命令
1, #typedef 定义类型别名2, #define PI(形参表) 3.14 定义一个表示符和一个字符串3, #undef PI 终止宏定义的作用域4, #include 包含一个源代码5, #if 如果给定条件为真,则编译下面代码6, #ifdef 如果宏已经定义,则编译下面代码7, #ifndef 如果宏没有定义,则编译下面代码原创 2015-08-18 16:15:17 · 396 阅读 · 0 评论