fix: seed C array example randomness once across translations (#1910)

Co-authored-by: krahets <[email protected]>
This commit is contained in:
mazezen
2026-10-11 02:23:46 +08:00
committed by GitHub
co-authored by krahets
parent e0f6d18618
commit 7afce71b13
5 changed files with 15 additions and 0 deletions
@@ -70,6 +70,9 @@ int find(int *nums, int size, int target) {
/* Driver Code */
int main() {
/* 初始化随机种子(只需执行一次) */
srand((unsigned)time(NULL));
/* 初始化数组 */
int size = 5;
int arr[5];