CNS refers to the brain and spinal cord. Its a very general term. Hypothalamus is part of the CNS structure but its unique in a sense that it secretes many chemicals into the bloodstream like glands hence part of the endocrine system! so they are both correct!