随笔分类 -  C语言

摘要:// 结构体中的元素的第二种访问的方法。#include <stdio.h>#include <stdlib.h>struct Person{ int age; void (*p)();}; void persons(){ printf("have lunch\n "); }int main(){ 阅读全文
posted @ 2021-03-16 11:11 LInguistic-零点 阅读(191) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h>#include <stdlib.h>void myputs(char*p) //此处的*号是标志,标志这P是一个指针{ if(p==NULL){ printf("需要输出的字符串为空,请重新输入"); }else{ while(1) {putchar(*p++) 阅读全文
posted @ 2021-03-10 18:11 LInguistic-零点 阅读(494) 评论(0) 推荐(0) 编辑
摘要://////////////////////////////////////////////////////////////////////////结构体指针部分一//////////////////////////////////////////////////////////////////// 阅读全文
posted @ 2021-03-10 18:02 LInguistic-零点 阅读(1105) 评论(0) 推荐(0) 编辑
摘要:////////////////////////////////////////////////////////////////////////////////////////结构体部分一//////////////////////////////////////////////////////// 阅读全文
posted @ 2021-03-10 17:53 LInguistic-零点 阅读(87) 评论(0) 推荐(0) 编辑
摘要://////////////////////////////////////////////////////////////////////////////例程1///////////////////////////////////////////////////////////////////// 阅读全文
posted @ 2020-10-16 12:52 LInguistic-零点 阅读(162) 评论(1) 推荐(0) 编辑
摘要:#include <stdio.h>#include <stdlib.h> //第一个参数表示的是地址,第二个参数表示的是数组的长度 //注意数组的长度超过数组的元素的时候,其中数组空余的地址全部由系统自动用0进行补充。void arrypoint(int datas[], int ent ){ / 阅读全文
posted @ 2020-09-23 16:57 LInguistic-零点 阅读(2447) 评论(0) 推荐(0) 编辑
摘要://使用数组统计某一学科的最高分、最低分、平均分。#include <stdio.h>#include <stdlib.h>int main(){int i;int max;int min;float ave;int sum=0;//重点。重点。重点。在定义所有的数的求和的时候,应当将初值进行初始化 阅读全文
posted @ 2020-09-17 13:38 LInguistic-零点 阅读(1784) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h>#include <stdlib.h>int main(){ int i; //1.数组是一个集合 //2.数组中的元素的类型都是相同的//3.数组的地址是连续的int arry[100];//只进行了数组大小的定义int arry1[3]={1,2,3}; // 阅读全文
posted @ 2020-09-17 13:24 LInguistic-零点 阅读(806) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h>#include <stdlib.h>int a=10; //此处是全局变量,在函数内部定义的函数是局部变量。//形式参数具有自己的内存空间,也是一个变量。//1、在函数被调用的时候才会申请了该空间。//2、在函数执行结束的时候,内存空间将会被释放。void bu 阅读全文
posted @ 2020-09-05 13:29 LInguistic-零点 阅读(867) 评论(1) 推荐(0) 编辑

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