The protein structure is given by the amino acid sequence that conforms the primary structure of the protein. The sequence determines the folding of the protein and its final shale, or level of structure.
The structure of the protein determines its function, so if for example the protein would lose its shape in any level of structure, then it will no longer be functional. On the other hand, if by any mutation the amino acid sequence changes so that the protein structure is affected, then the protein will be unable to perform its functions.
So, the structure of the protein is affects directly its function. The correct option is B.