C语言 ch[ ][10]={"123","456","789"}第一个[ ]中有多大怎么让程序自己判断判断?

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/09 03:50:39

C语言 ch[ ][10]={"123","456","789"}第一个[ ]中有多大怎么让程序自己判断判断?
C语言 ch[ ][10]={"123","456","789"}第一个[ ]中有多大怎么让程序自己判断判断?

C语言 ch[ ][10]={"123","456","789"}第一个[ ]中有多大怎么让程序自己判断判断?
#include
#include
void main()
{
char ch[][10]={"123","456","789"};
int a;

a=sizeof(ch)/10;
printf("%d",a);
}