摘要: /* who_test.c */ #include<stdio.h> #include<string.h> #include<getopt.h> #include<time.h> #include<stdlib.h> #include<stdbool.h> #include<utmp.h> //设置 阅读全文
posted @ 2019-11-26 09:29 王清河 阅读(550) 评论(0) 推荐(0) 编辑
摘要: utmp结构体定义如下: structutmp { short int ut_type; // 登录类型 pid_t ut_pid; // login进程的pid char ut_line[UT_LINE_SIZE]; // 登录装置名,省略了"/dev/" char ut_id[4]; // In 阅读全文
posted @ 2019-11-26 09:28 王清河 阅读(1220) 评论(0) 推荐(0) 编辑
摘要: /* float.c */ #include<stdio.h> #include<string.h> int main() { FILE *fp = fopen("Data.txt","w+"); float f[3][5] = {{-3.41, 5.63, 6, 7.8, 1.3}, {4.5 , 阅读全文
posted @ 2019-11-26 08:58 王清河 阅读(691) 评论(0) 推荐(0) 编辑