This may be a stupid question but how does the sizeof operator know the size of an array operand when you don\'t pass in the amount of elements in the array. I know it does
If you're using sizeof on a local variable, it knows how many elements you declared. If you're using sizeof on a function parameter, it doesn't know; it treats the parameter as a pointer to the array and sizeof gives the size of a pointer.