The thing that always catches me out when switching between VB and C (as I'm often working on embedded devices then doing the support app on the PC in VB) is the arrays. Its a bit of a legacy of ANCIENT Visual Basic. In C you define an array with 16 elements, you get 16 elements, in old old VB if you defined an array with 16 elements you got 16 elements.... Difference was that VB being BASIC was trying to be nice and non-confusing by numbering them 1 to 16.
Nowadays VB does have a 0th element but as a legacy of old VB, Dim thing(16) actually gives you 17 elements numbered 0-16 because shifting everything to 0 referenced would have broken legacy code.
So if you want 16 elements numbered 0-15, you actually declare Dim thing(15).... this often catches me out when switching between the two as sometimes I will declare one less element than I actually need in C and obviously end up with some odd side effects as a result.
Easiest way to think about it is in VB, you define the index of the final element rather than the number of elements you actually want.