c语言第18题怎么做
展开全部
答案 12334
func(a,2,9);
执行过程
a[10] = a[9] = 10
a[9] = a[8] = 9
a[8] = a[7] = 8
a[7] = a[6] = 7
a[6] = a[5] = 6
a[5] = a[4] = 5
a[4] = a[3] = 4
a[3] = a[2] = 3
最终数组a的值 1,2,3,3,4,5,6,7,8,9,10,0,0,0,0,0,0,0,0,0
这种问题,自己直接拿笔打草纸上算算就出来,最基础的c语言。。。
func(a,2,9);
执行过程
a[10] = a[9] = 10
a[9] = a[8] = 9
a[8] = a[7] = 8
a[7] = a[6] = 7
a[6] = a[5] = 6
a[5] = a[4] = 5
a[4] = a[3] = 4
a[3] = a[2] = 3
最终数组a的值 1,2,3,3,4,5,6,7,8,9,10,0,0,0,0,0,0,0,0,0
这种问题,自己直接拿笔打草纸上算算就出来,最基础的c语言。。。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询