Multi-choice problem: does word "head" have the same meaning in the following two sentences?

He stuck his head out the window.

Be careful when you pet that dog on the head; it may bite.

Possible answers:
a). different meanings;
b). the same meaning;
b).