current position:Home>The error cannot be found. The output is garbled. Where is the problem

The error cannot be found. The output is garbled. Where is the problem

2022-01-27 00:36:34 CSDN Q & A

img

img


This can't find an error , The output is garbled , What went wrong
a.c: In function ‘main’:
a.c:5:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^
a.c:7:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&s[i]);
^ This is the prompt after submission




Refer to the answer 1:

a、b、c、d、e Not initialized to 0




Refer to the answer 2:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/01/202201270036313544.html

Random recommended