This is quite a difficult subject because of the word "friendship". It is a word that was created by humans for humans. Scientists running studies about the behavior of domestic cats don't usually like to refer to the idea of friendship in relation to cats. They use terms such as "affiliative relationships", "close relationships" or "preferred associates"1. The same thing effectively.
We often see friendship between cats in feral cat colonies. These are groups of cats that have formed naturally because of a suitable food source. The cats are free to choose who should be in the group and their friends.
In multi-cat households where the home owner decides which cat to bring into the group, the existing cats don't have a choice. However the domestic cat's learned adaptability allows him/her to fit in and become settled over time - it can take months and more. Amongst these groups friendships are formed.
Pairs of cats or sub-groups of cats form obvious bonds. Cat caretakers report that their cats often play, groom and sleep together. The friendships formed are stable and long lasting unencumbered by the emotional issues that affect human to human relationships.
Cats are "not asocial" so says S.L. Crowell-Davis in The Welfare of Cats. There are lots of signs of the presence of close relationships amongst cats living in groups. These signs can be called "affiliative behaviours". Affiliative behaviors include: touching noses on greeting (with tail up perhaps), allogrooming (grooming - licking, each other), allorubbing (rubbing against each other), playing together and resting/sleeping together.
|From Cat House on the Kings.|
When friends (preferred associates) greet each other than often touch noses. It is irrelevant whether the friendship is between males or females or male to female. Gender does not play a role in the greeting of touching noses!
As an aside I have seen very vigorous head butting of the domestic cat to the human. Head butting is scent exchange and a greeting behavior. It is an act of friendship. These forms of friendly behavior can be fairly vigorous as I say. Sometimes cats will rub their heads, tails and bodies together for several minutes. Tails are very tactile and sensitive. You only have to place your hand close to a cat's tail and it will move. They almost seem to be a substitute for a hand, a limb without a claw.
Cats who are preferred associates will often purr while they rub against each other quite vigorously. This is also a form of scent exchange and common sense dictates that rubbing together or wrapping a tail around another cat is a similar to a hug in human terms.
Apparently the above signs of friendship are seen more frequently between feral cats and occur when the cats are reunited after hunting separately. This seems to make sense as the domestic cat in a household, particularly full-time indoor cats, are not separated and so do not need to employ greeting behaviors.
Sometimes a couple of friendly cats will start grooming each other when one of them approaches the other and lowers his/her head - offering it up for a session of licking. The cat wishing to be licked will, understandably, be cooperative and position himself in a convenient manner to receive the maximum benefit.
Friendly cats often rest and sleep together. You see it all the time in photographs on the internet. Sometimes the reason is to keep warm in cold conditions. However, feral cats do it even when it is hot. Cats sleep and rest together because they have a strong bond - a close friendship. Apparently males make half as many bodily contacts as females. In one large study of feral cats, "64% of interactions involved licking", while rubbing was used in 29%. Females and kittens started the contact apparently much more often than males2.
The formation of friendships between cats may in part be dependent on the comfort of the cats. Where there is a steady supply of food, cats become more sociable. The same could be said about people.
Playing together is another sign of friendship between cats. As expected the desire to play is dependent on the character of the individual cat. Cats have their character, which is a reason why it is probably incorrect to speak of cat breed characteristics. Play between cats is most commonly seen between the ages of four weeks and four months of age. Adult cats also play but some rarely play. The desire to express friendship through play is probably dependent on inherited character (genetics), early experiences and the "timing of particular experiences"1.
Despite the harsh life and poor diet of adult feral cats they still play. Play burns calories. Under difficult conditions you would have thought that feral cats would limit what might be seen as a wasteful expenditure of calories. Clearly play is important, which means that friendship is important to cats. This reflects the feelings of their human caretakers.
1. The Welfare of Cats ISBN 978-1-4020-6143-1. This is an excellent book. It is a bit technical but that makes it more reliable.
2. Encyclopedia of the Cat page 84 ISBN 978-1-4053-2149-5