You can put this solution on YOUR website!
Generally a constant function , can be one-to-one since for different values of we have the same value of , namely .
Similarly, it can not be as other than no element in co-domain will have pre-image in domain.
But yes there be a case in which there is only in co-domain then in this scenario we can say that function is .
Thus, in general a constant function can neither be onto nor one-one.