You need to actually give the result back.
int sum (int p, int q)
Missing semicolons, you need the number 0 not the letter o, and there are 10 ints in the array, 0 through 9, so 10 is out of bounds.
for(i=0; i<10; i++)
You want to assign the ADDRESS of number to the pointer (ptrl is a pointer, so it stores an address.) You CAN'T do *ptrl = number; this copies number into the place pointed at by ptrl -- but ptrl is an uninitialized pointer, dereferencing it yields undefined behavior. The line ptrl=&number; initializes the pointer (by making it point to the memory location of "number". After that, you can dereference it successfully in the next statement.
printf("the value pointed by ptrl is %d\n", *ptrl);
printf("the number is 4\n");
printf("the number is 8\n");
printf("the number is not for or 8\n");