All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
We have stated in a number of Fataawa previously that it is permissible to keep a cat as a pet with the condition of feeding it and not imprisoning it and thus causing it to die.
Ibn ‘Umar narrated that the Prophet said: “A woman was punished and entered Hellfire because she kept a cat in captivity until it died; she neither fed it nor gave it water to drink; nor did she allow it to go out and eat from the vermin of the earth.” [Al-Bukhari and Muslim]
As regards feeding it with food that is not lawful; if you mean impure food, like dead meat, or pig meat, and the like, or feed something which contains alcohol, then there is nothing wrong in feeding it with such food, especially that it is not lawful to eat its meat (the cat). Therefore, there is no harm in feeding it what is impure (in itself) or something that has become impure (by being touched with impurity).
The Kuwaiti Fiqh Encyclopedia reads: “Feeding animals impure feed or feed that has become impure: the Maaliki and Shaafi'i Schools permitted feeding impure feed or feed that has become impure for the animals. […...] The Hanbali School permitted feeding that to the animals the meat of which we are not allowed to eat, but they did not allow it for the animals whose meat we are allowed to eat, unless if he feeds it and does not slaughter it except after three days; in the same way Al-Jallaalah is dealt with (Al-Jallaalah is a term that refers to animals and birds that eat impure food, like filth, dung and the like).”
For more benefit, please refer to Fatwa 82701.
Allah knows best.