c语言中如何在主函数定义一个值在子函数中通用?

2025-02-27 01:02:18
推荐回答(2个)
回答1:

  1. 把那5个函数加个参数,如void output(int a[], int n);

  2. 把n定义为全局变量

回答2:

将int n放到main的前面