c语言指针与数组

c语言知识点

数组

int score[100];

score[0]=89;

score[1]=99;

下标>=0 小于数组的长度-1

1.定义数组

类型数组名[长度];

int score[10]={11,22,33,44,55,66,77,88,44,2};

2.使用数组

数组名[下标]

3,最大值 最小值 平均值 排序

多维数组

int score[10][30];

int score[5][10][30];

每一维的下标都是从0开始到数组的长度-1

函数

将程序中的功能模块化处理。

函数返回值 函数名 (参数列表)

{

函数体

}

intmax(int a,int b)

{

return a>b?a:b;

}

ints;

s=max(3,5);

stdio.h

stdlib.h

string.h

graphics.h

....

函数库 api

application interface

c语言指针与数组相关文档

最新文档

返回顶部