A gland having endocrine as well as exocrine function is
pancreas
The correct option is B.
Explanation for the correct option:
Pancreas:
Explanation for the incorrect options:
Option A:
Adrenal gland is an endocrine gland which secretes many hormones such as mineralocorticoid hormone, glucocorticoid hormone, sex hormones etc.
Option C:
Thyroid is an endocrine gland which secretes thyroxine that helps in metabolism.
Option D:
Pituitary is the master gland and it is an endocrine gland which produces hormones such as the growth hormone, oxytocin, prolactin etc.
Final Answer: Hence,Pancreas is the gland which functions as endocrine as well as exocrine.