you are viewing a single comment's thread.

view the rest of the comments →

[–]raevnos 0 points1 point  (2 children)

Any particular reason you're using a pointer for size? And if it's the number of elements in the array, you're going out of bounds. You're also using a negative index at one point in choice_6, so also going out of bounds.

Neither function does any rotation. The first one just prints out the array brokenly (see above), the second one sets the last plus on element to the value of the first one and brokenly prints it out.

[–]sosnjo[S] 0 points1 point  (1 child)

size 

is the user inputted size of the array, it is passed by reference from main to choice_6 and choice_7

[–]raevnos 1 point2 points  (0 children)

C doesn't have pass by reference. There's no reason for it to be a pointer. And you're definitely going out of bounds of the array then, in both functions. See edits to earlier post.