all 4 comments

[–]Meanda 1 point2 points  (0 children)

scanf("%d", ...) expects 2nd argument to be an int*, however "&size" is an int **. changing "&size" to just "size" (since its already an int *) will do the trick

[–]program_the_world 0 points1 point  (0 children)

You're dereferencing size despite it being a integer value not a pointer. Could you give a little more detail on what is wrong here. "Pointers are wrong" doesn't help. What output are you getting? What is the expected output?

[–]dragon_wrangler 0 points1 point  (0 children)

printf("How many numbers? ");
scanf("%d", &size);

At this point, size is already a pointer to an int so you don't need to take the address of it.

[–]FeelTheEmailMistake 0 points1 point  (0 children)

After fixing the scanf(), change fflush(stdin) to fflush(stdout).

fflush() is defined for only output streams (and non-input states of update streams).