07 2021 档案

摘要:#include <stdio.h> //定义一个参数类型为 函数指针的函数 int calc(int x, int y, int (*pt)(int, int) ); int add(int,int); int sub(int,int); int getSum(int,int); int getG 阅读全文
posted @ 2021-07-31 15:43 学而不思则罔! 阅读(40) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> //fopen函数的包 #include <stdlib.h> //exit()函数的包 #include <string.h> //typedef为数据类型搞一个别名,规范这个别名通常会用大写 typedef char * STRING; //用define来 阅读全文
posted @ 2021-07-28 18:27 学而不思则罔! 阅读(37) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> //fopen函数的包 #include <stdlib.h> //exit()函数的包 #include <string.h> //定义一个枚举类型(默认从0开始) enum ctype1 { one = 6, two, three, four, five} 阅读全文
posted @ 2021-07-28 16:19 学而不思则罔! 阅读(34) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> //fopen函数的包 #include <stdlib.h> //exit()函数的包 #include <string.h> //定义结构 struct Person{ char id; int name [4]; double score; }; //定义 阅读全文
posted @ 2021-07-28 14:18 学而不思则罔! 阅读(154) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> //fopen函数的包 #include <stdlib.h> //exit()函数的包 #include <string.h> //定义一个带有匿名结构成员的结构 struct Person{ char id; int name [4]; struct {ch 阅读全文
posted @ 2021-07-27 19:26 学而不思则罔! 阅读(57) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> //fopen函数的包 #include <stdlib.h> //exit()函数的包 #include <string.h> //定义一个结构- 把struct Person当做一种数据类型 struct Person{ char id; int name 阅读全文
posted @ 2021-07-27 19:04 学而不思则罔! 阅读(59) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> //fopen函数的包 #include <stdlib.h> //exit()函数的包 #include <string.h> //定义一个结构- 把struct Person当做一种数据类型 struct Person{ int id; char name 阅读全文
posted @ 2021-07-27 17:17 学而不思则罔! 阅读(63) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> //fopen函数的包 #include <stdlib.h> //exit()函数的包 #include <unistd.h> //定义一个结构- 把struct Person当做一种数据类型 struct Person{ char *name; int ag 阅读全文
posted @ 2021-07-26 14:19 学而不思则罔! 阅读(44) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> //fopen函数的包 #include <stdlib.h> //exit()函数的包 #include <unistd.h> //定义一个结构- 把struct Person当做一种数据类型 struct Person{ char *name; int ag 阅读全文
posted @ 2021-07-26 08:33 学而不思则罔! 阅读(72) 评论(0) 推荐(0) 编辑
摘要:#!/bin/bash #定义数组1 arr1=('gao' 1 b c) arr2[0]=10 arr2[1]=9 arr3[3]="gaocun" #读取元素 echo ${arr1[0]} echo ${arr2[1]} #读取元素所有的值 echo ${arr1[*]} echo ${arr 阅读全文
posted @ 2021-07-19 11:03 学而不思则罔! 阅读(10) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> #include <stdlib.h> #include <unistd.h> //1.静态数组 int i_arr1[3] = {1, 2, 3}; int size = 3; int main() { //创建数组的三种方法 /*1.静态数组 特点:1.用常 阅读全文
posted @ 2021-07-12 20:02 学而不思则罔! 阅读(189) 评论(0) 推荐(0) 编辑
摘要:/* --生成随机数的函数(返回一个0~32768的伪随机数)*/ static unsigned long int next = 1; //种子 unsigned int rand0() { /* 生成伪随机数的魔术公式*/ next = next * 1103515245 + 123456; r 阅读全文
posted @ 2021-07-12 16:27 学而不思则罔! 阅读(104) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> #include <stdlib.h> int value1 = 100; //文件作用域、外部链接、静态存储期 int static value2 = 99; //文件作用域(仅限翻译单元)、内部链接、静态存储期 void isOk(); void isOk1 阅读全文
posted @ 2021-07-12 15:22 学而不思则罔! 阅读(46) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> #include <stdlib.h> void isOk(); int main() { isOk(); isOk(); isOk(); int index; return 0; } void isOk() { int index ; static int c 阅读全文
posted @ 2021-07-10 16:22 学而不思则罔! 阅读(111) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> #include <stdlib.h> int main() { const char *pt = "abcdef"; /* 1.abcdef字符串字面量对象 2.字符数组对象(单个元素也是对象) 3.标识符为pt的对象,存储字符串的地址 const 修饰的是字 阅读全文
posted @ 2021-07-09 20:13 学而不思则罔! 阅读(44) 评论(0) 推荐(0) 编辑
摘要:待补充 阅读全文
posted @ 2021-07-08 16:46 学而不思则罔! 阅读(21) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> #include <stdlib.h> int main() { char * spt = " 1100100.1111end...."; printf("将字符串%s转成数值类型: 2int:%d 2long:%ld 2double:%f\n", spt, a 阅读全文
posted @ 2021-07-08 16:42 学而不思则罔! 阅读(254) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> #include <string.h> int main(int argc,char * arr[]) { //当前脚本的输入参数的计数 printf("当前脚本输入的个数为:%d\n",argc ); //接收的参数内容为,只能接受字符串,用空白符分割,格式为 阅读全文
posted @ 2021-07-08 08:54 学而不思则罔! 阅读(74) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> #include <string.h> int main() { char str[] = "mnbvcxzlkjhgfdsapoiuytrewq"; int size = strlen(str); int index = 0; for (int i = siz 阅读全文
posted @ 2021-07-06 12:27 学而不思则罔! 阅读(129) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> #include <string.h> int * getarr(int * ipt); int main() { int a = 99; char * ch ; int *p = getarr(&a); //gets(ch); printf("%d\n", * 阅读全文
posted @ 2021-07-02 20:04 学而不思则罔! 阅读(220) 评论(0) 推荐(0) 编辑
摘要:#!/usr/bin/python # -*- coding: UTF-8 -*- #get_min_char 获取指定字符串中最小的字符 def get_min_char(str): min = str[0]; for ch in str: if( min > ch ): min = ch ret 阅读全文
posted @ 2021-07-02 15:59 学而不思则罔! 阅读(26) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示