有大佬能告诉我这段代码有什么问题吗?他一直输出乱码。 #143453
Unanswered
ningyuan7
asked this question in
Programming Help
Replies: 2 comments 2 replies
-
你可能没有给每一个变量赋予初始值,这几个数组所有的变量都没有给赋值,有可能是编译器直接使用内存中的数据赋值了才导致乱码。 我认为你需要在 int arrLength = 10000;
for (int i = 0; i < arrLength; i++) a[i] = 0;
for (int i = 0; i < arrLength; i++) b[i] = 0;
for (int i = 0; i < arrLength; i++) c[i] = 0; |
Beta Was this translation helpful? Give feedback.
1 reply
-
Thanks for posting in the GitHub Community, @ningyuan7 ! We’ve moved your post to our Programming Help 🧑💻 category, which is more appropriate for this type of discussion. Please review our guidelines about the Programming Help category for more information. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
#include <stdio.h>
int main()
{
int n, c, l, r;
}
Beta Was this translation helpful? Give feedback.
All reactions