随笔分类 -  【编程基础-C】

【c学习-14】
摘要:/*练习*/ #include int testFeiunction(b[],n){ b[1]=1; n=10; } int main(){ int a[10]={1,2,3,4,5}; int n=10; testFeiunction(a,n); printf("%d,%d",a[1],n); } 阅读全文

posted @ 2018-08-29 17:18 activecode 阅读(159) 评论(0) 推荐(0)

【c学习-13】
摘要:/*库函数 1:数学函数库:math.h abs():绝对值; acos(),asin(),atan():cos,sin,tan的倒数 exp():指数的次幂 pow(x,y):x的y次幂 log():对数 rand():随机数 sqrt():平方根 sin(),cos(),tan():正弦,余弦, 阅读全文

posted @ 2018-08-28 18:21 activecode 阅读(156) 评论(0) 推荐(0)

【c学习-12】
摘要:/*枚举*/ #include void enumFunction(){ enum enum_var{"a","b",1,2}; enum{"c","d",2,1}enum_var_2; printf("enum_var:%d\nenum_var_2:%d\n", enum_var,enum_var 阅读全文

posted @ 2018-08-26 10:09 activecode 阅读(148) 评论(0) 推荐(0)

【c学习-10】
摘要:#include #include #define SOURCE 0 //递归函数 /* [基本类型 [整型(int,[长整型(long int), [短整型(short int),长度整型(long short int) ),字符型(char),布尔型(bool) c语言结构类型 : [浮点型(d 阅读全文

posted @ 2018-08-24 10:24 activecode 阅读(205) 评论(0) 推荐(0)

【c学习-10】
摘要:#include #include #include //操作系统操作库文件 //#include #include #include #include #define Point(a,b)((a)>(b))?:(a)(b) //宏 //int *p1, *p2;//i,j,z,w; void go 阅读全文

posted @ 2018-08-23 09:12 activecode 阅读(109) 评论(0) 推荐(0)

【c学习-8】
摘要:/*继承结构体*/ #include // 定义子结构体 struct date{ int year; int month; int day; }; //定义父结构体 struct student{ char name[20]; int age; char sex; struct date birt 阅读全文

posted @ 2018-08-21 08:22 activecode 阅读(237) 评论(0) 推荐(0)

【c学习-7】
摘要:#include /*#include"test31.c"*/ //定义阶乘函数 /* int fac(int n){ //定义寄存器存储变量 register int i ,f=1; //循环形参计数器计数阶乘表达式 for(i=0;i extern varx; int power(int n){ 阅读全文

posted @ 2018-08-20 13:03 activecode 阅读(171) 评论(0) 推荐(0)

【c学习-6】
摘要:void myFunction4(){ //根据用户字段和密码字段判定是否允许登录 //定义原密码和用户字段 char user[10]={"liupeng"};//设置用户名字段 char password[10]={"Lp200107"};//设置密码字段 char struser,strpas 阅读全文

posted @ 2018-08-19 08:00 activecode 阅读(148) 评论(0) 推荐(0)

【c学习-5】
摘要:int main(){ //二维数组的应用 int i,j; int a[2][3]; for(i=0;i void myFunction(){ int a[3]; int i; int max; for(i=0;imax){ max=a[i]; k=i; } printf("min :%3d\n" 阅读全文

posted @ 2018-08-18 17:00 activecode 阅读(185) 评论(0) 推荐(0)

【c学习-5】
摘要:下表列出了c程序中常见的保留字 转义字符常量 阅读全文

posted @ 2018-08-16 11:34 activecode 阅读(171) 评论(0) 推荐(0)

【c学习-4】
摘要:#include<stdio.h>#include "SeqList.h"int main(){dataType myAge=18;printf("myAge=%d\n",myAge);return 0;} 阅读全文

posted @ 2018-08-15 17:49 activecode 阅读(121) 评论(0) 推荐(0)

【c学习-3】
摘要:恢复内容开始 恢复内容结束 阅读全文

posted @ 2018-08-14 17:14 activecode 阅读(166) 评论(0) 推荐(0)

【c学习-2】
摘要:#include #define MYVAR 18 int main(){ //float x=3.14; //x=3.14++; //printf("%c\n",x); //int x=1; printf("%%"); char chTemp=getchar(); printf("%c\n",chTemp); int x[4]={1,2,3,4,5}; printf("%d\n",... 阅读全文

posted @ 2018-08-14 11:03 activecode 阅读(126) 评论(0) 推荐(0)

【c学习-1】
摘要:#include int main(){ int a,b,max; printf("请输入两个整数:"); //格式化输出函数 scanf("%d%d\n",&a,&b); //格式化输入函数 max=a; if(max int main(){ int age; printf("请输入你的年龄:\n"); ... 阅读全文

posted @ 2018-08-13 09:30 activecode 阅读(150) 评论(0) 推荐(0)

导航