请问,什么叫一维数组和二维数组呢?
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/10 09:01:11
请问,什么叫一维数组和二维数组呢?
这好象是汇编语言的问题吧
举个例子吧
#include "iostream.h"
#include
int main()
{char a[][10] = {"Book","Basic","Boolen","Babble","Bascket"},b[10]; //为什么这里要定义为二维数组,用一维数组怎么不可以?
int i;
strcpy (b,a[0]);
for (i = 1;i < 5;i++)
if (strcmp (b,a[i])>0)
strcpy (b,a[i]);
cout
举个例子吧
#include "iostream.h"
#include
int main()
{char a[][10] = {"Book","Basic","Boolen","Babble","Bascket"},b[10]; //为什么这里要定义为二维数组,用一维数组怎么不可以?
int i;
strcpy (b,a[0]);
for (i = 1;i < 5;i++)
if (strcmp (b,a[i])>0)
strcpy (b,a[i]);
cout