The basic way is to have a doubly-nested loop :
Code:
for each offset from 0 to length-1
{
for each index from 0 to length-1
{
if a[offset+index mod length] not equal b[index] exit inner loop and start with next offset
}
if you didn't exit the loop prematurely, all elements match with this offset so print the offset and exit
}
print no match found
A bit more advanced :
Create a 3rd array which is twice the length of the first array.
Copy the contents of the first array to the start of the third array, and then copy it again to the middle so you have two copies back to back of the first array. Loop through each offset value from 0 to size of array-1 and use memcmp to compare the second array to the length 10 array starting at array_three[offset].
When you get a match you've found the offset.
You could also use cross-correlation between the two arrays and look for the first peak - that will work even if there's some noise in your data.