Help with arrays: how to input array size and characters

This is a discussion on Help with arrays: how to input array size and characters within the C Programming forums, part of the General Programming Boards category; Hey guys i need help with a program
The first function outputs the n elements stored in the array, and ...

Help with arrays: how to input array size and characters

Hey guys i need help with a program
The first function outputs the n elements stored in the array, and the second function sorted the array using the basic bubble sort.
i'm unsure of how to use arrays properly so i don't know exactly how to print and input both size and numbers in an array
i'm support to sort the array

i think at least some parts of the code may be right but i'm sure what i'm doing right or wrong as i'm not sure about how to use arrays properly
any help would be grateful thanks

1) The name of the function must always be the same. In your declaration you call the function "getIntArray" but in the definition you call it "getArray". Choose one name and stick to it.

2) The body of the function you commented out doesn't look too bad. Your while-syntax is wrong: either use a do-while-loop or an infinite while-loop. You have to break out of the loop if n == nmax. And you should return the number of elements in the array after you've read all elements.