ARRPARAM.C
资源名称:C.rar [点击查看]
上传用户:qq5388545
上传日期:2022-07-04
资源大小:29849k
文件大小:0k
源码类别:
界面编程
开发平台:
C/C++
- #include <stdio.h>
- void show_array(int values[], int number_of_elements)
- {
- int i;
- printf("About to display %d valuesn", number_of_elements);
- for (i = 0; i < number_of_elements; i++)
- printf("%dn", values[i]);
- }
- void main(void)
- {
- int scores[5] = {70, 80, 90, 100, 90};
- int count[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
- int small[2] = {-33, -44};
- show_array(scores, 5);
- show_array(count, 10);
- show_array(small, 2);
- }