Skip to content

Instantly share code, notes, and snippets.

@zaccone
Created September 5, 2016 20:23
Show Gist options
  • Save zaccone/9e7e3b65101820de0cbe8db51af8e7e1 to your computer and use it in GitHub Desktop.
Save zaccone/9e7e3b65101820de0cbe8db51af8e7e1 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char **argv)
{
size_t size;
scanf("%lu", &size);
int *arr = (int *)malloc(size * sizeof(int));
memset(arr, 0, sizeof(arr));
for (unsigned long i = 0; i < size; i++) {
printf("Val: %d\n", arr[i]);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment