摘要:/*练习*/ #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); }
阅读全文
摘要:/*库函数 1:数学函数库:math.h abs():绝对值; acos(),asin(),atan():cos,sin,tan的倒数 exp():指数的次幂 pow(x,y):x的y次幂 log():对数 rand():随机数 sqrt():平方根 sin(),cos(),tan():正弦,余弦,
阅读全文
摘要:/*枚举*/ #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
阅读全文
摘要:#include #include #define SOURCE 0 //递归函数 /* [基本类型 [整型(int,[长整型(long int), [短整型(short int),长度整型(long short int) ),字符型(char),布尔型(bool) c语言结构类型 : [浮点型(d
阅读全文
摘要:#include #include #include //操作系统操作库文件 //#include #include #include #include #define Point(a,b)((a)>(b))?:(a)(b) //宏 //int *p1, *p2;//i,j,z,w; void go
阅读全文
摘要:/*继承结构体*/ #include // 定义子结构体 struct date{ int year; int month; int day; }; //定义父结构体 struct student{ char name[20]; int age; char sex; struct date birt
阅读全文
摘要:#include /*#include"test31.c"*/ //定义阶乘函数 /* int fac(int n){ //定义寄存器存储变量 register int i ,f=1; //循环形参计数器计数阶乘表达式 for(i=0;i extern varx; int power(int n){
阅读全文
摘要:void myFunction4(){ //根据用户字段和密码字段判定是否允许登录 //定义原密码和用户字段 char user[10]={"liupeng"};//设置用户名字段 char password[10]={"Lp200107"};//设置密码字段 char struser,strpas
阅读全文
摘要: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"
阅读全文
摘要:下表列出了c程序中常见的保留字 转义字符常量
阅读全文
摘要:#include<stdio.h>#include "SeqList.h"int main(){dataType myAge=18;printf("myAge=%d\n",myAge);return 0;}
阅读全文
摘要:#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",...
阅读全文
摘要:#include int main(){ int a,b,max; printf("请输入两个整数:"); //格式化输出函数 scanf("%d%d\n",&a,&b); //格式化输入函数 max=a; if(max int main(){ int age; printf("请输入你的年龄:\n"); ...
阅读全文