How to get the length of array in C? is

How to get the length of array in C? is "sizeof" is one of the solution? - Stack Overflow

瀏覽:693
日期:2025-06-14
... Sizeof an array in the C programming language? Why does a C-Array have a wrong sizeof() value ... { int arr[]={1,2,3,4,5}; clrscr(); printf("Length: %d\n",sizeof(arr)); printf("Length: %d\n",sizeof(arr)/sizeof(int)); show(arr); getch(); } void...看更多