在C中查找数组的长度 [英] Find length of an array in C

查看:80
本文介绍了在C中查找数组的长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们不知道数组的长度时,我们可以使用array.length吗。我使用C语言

解决方案


当我们不知道数组的长度时我们可以使用array.length。我使用C语言



您可以应用类似下面的内容来查找数组的长度

展开 | 选择 | Wrap | 行号


嗯,除非数组的最后一个元素是一些标记值,否则你找不到数组的长度。


您可以应用类似下面的内容来查找数组的长度

< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号


Can we use array.length when we dont know lengt of array.I use C language

解决方案

Can we use array.length when we dont know lengt of array.I use C language

You can apply something like following to find the length of an array

Expand|Select|Wrap|Line Numbers


Erm, you can''t find the length of an array unless the last element of the array is some sentinel value.


You can apply something like following to find the length of an array

Expand|Select|Wrap|Line Numbers


这篇关于在C中查找数组的长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆