1.学生信息处理 代码如下: (全部手敲了一遍累到自己了,就没有加很多注释.....) 1 #include <stdio.h> 2 #include <string.h> 3 #define N 3 4 typedef struct student{ 5 int num; //学号 6 char ...
分类:
其他好文 时间:
2021-06-05 17:45:16
阅读次数:
0
通过stat函数获取文件的大小,单位bytes;无需将文件读入内存,可以计算大文件; #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <stdio.h> int stat(const char *pa ...
分类:
编程语言 时间:
2021-06-05 17:44:27
阅读次数:
0
思路:把每一个k阶看成一个3*3的网格,计算出点到每层(0,0)的距离,递归求出下一阶n-1的距离。 #include"stdio.h" #include"math.h" #include"string.h" #include"iostream" #include"algorithm" using ...
分类:
其他好文 时间:
2021-06-04 19:40:06
阅读次数:
0
#include <stdio.h>#include <unistd.h>int main(){ int i = 10; pid_t pid; printf("Father's pid:%d\n", getpid()); pid = fork(); if(pid < 0) { perror("for ...
分类:
其他好文 时间:
2021-06-04 19:24:24
阅读次数:
0
C语言自学教程--郝斌--C语言概述 为什么需要A 什么是A 怎么用A 注意的问题 A应用的领域 A是否重要 时代 勤奋 出身 机遇 天赋 C语言概述 1.为什么学C语言 # include <stdio.h> int main(void) { printf("欢迎大家学习C语言!\n"); ret ...
分类:
编程语言 时间:
2021-06-04 18:52:39
阅读次数:
0
#include <stdio.h> int main() { int price = 0; printf ("请输入金额(元)"); scanf ("%d",&price); int change = 100 - price; printf ("找您%d元\n",change); return 0 ...
分类:
其他好文 时间:
2021-06-02 20:47:52
阅读次数:
0
Visual Studio 断点调试webapi接口,只能用localhost登录api,无法用ip地址作为url访问 解决方法: 1、必须以管理员身份运行VS 2、修改【applicationhost.config】文件下的内容 ①项目文件夹下找到隐藏文件夹".vs”->config->appli ...
1 #include <time.h> 2 #include <stdio.h> 3 #include <errno.h> 4 #include <string.h> 5 #include <stdlib.h> 6 7 #include <winsock2.h> 8 #include <iphlpa ...
1、函数原型(利用指针求字符串的长度) #include <stdio.h> size_t strlen(const char *s) //函数头的形参为常数的、指向char型的指针,也就是接收的形参为指针(实际上传入的是字符串数组,函数间数组的传递实际上是通过指向第一个元素的指针完成的) { // ...
分类:
编程语言 时间:
2021-06-02 19:40:16
阅读次数:
0
Windows系统,C语言个人所得税计算系统。 1 #include <stdio.h> 2 3 #include <windows.h> 4 5 int main() 6 7 { const int ZBB=5000; 8 9 const float Ctaxrate0=0; 10 11 cons ...
分类:
其他好文 时间:
2021-06-02 19:31:27
阅读次数:
0