3 ms·
$ cat test.c #include <stdio.h> #include <string.h> int main() { int n = 10; int allocation[n]; memset(allocation, 42, sizeof(allocation
by Hello71 6y ago
$ cat test.c
#include <stdio.h>
#include <string.h>
int main() {
int n = 10;
int allocation[n];
memset(allocation, 42, sizeof(allocation));
for(int i = 0; i < n; i ++)
printf("%d\n", allocation[i]);
}
$ gcc test.c
$ ./a.out
707406378
707406378
707406378
707406378
707406378
707406378
707406378
707406378
707406378
707406378