请在 下方输入 要搜索的题目:

给定程序中,函数fun()的功能是:使数组中的元素的值缩小5倍。

请改正程序中的错误,使它能得出正确的结果。 注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。 试题程序: include<stdio.h> include<conio.h> float m[10]; /*************found**************/ int fun (void) { int j; printf("In subfunc after calling "); for(j=O;j<lO;j++) { ; /*************found********

发布时间:2025-06-04 23:25:07
推荐参考答案 ( 由 快搜搜题库 官方老师解答 )
联系客服
答案:正确答案:(1)错误:int fun(void) 正确:void fun(void)(2) 错误:printf("%f"m[j]%5); 正确:printf("%f"m[j]/5);(1)错误:int fun(void) 正确:void fun(void)(2) 错误:printf("%f",m[j]%5); 正确:printf("%f",m[j]/5); 解析:错误1:函数fun()没有返回值,所以定义函数类型为void。错误2:此
专业技术学习
专业技术学习
搜搜题库系统