You haven't provided enough information on what you are trying to achieve.
The simplest approach is to do what you've done: change the 3 to a 5 and recompile.
If you want the size to be changeable at run time (eg the size is input by the user) use malloc()
Code:
#include <stdio.h>
#include <stdlib.h> /* declares malloc() and free() */
int main()
{
int i, size;
int *test; /* note this is a pointer, not an array */
printf("Enter size : ");
scanf("%d", &size);
test = malloc(size*sizeof(*test)); /* dynamically allocate memory for size ints */
/* Use test as if it is an array */
for (i = 0; i < size; ++i)
test[i] = i;
/* other stuff using test as an array */
for (i = 0; i < size; ++i)
printf("%d\n", test[i]);
free(test); /* when we no longer need the memory supplied by malloc(), remember to free() it */
return 0;
}