When a hardcore character dies, does it still take up one character slot? I don't want my character to die just to know the result.
Granted your hardcore character reached at least level 10, they don't. They can be moved to a seperate tab where all the fallen heroes are listed.
For a hero that hasn't reached level 10 you can either keep him in your character list (and thus takes up a spot) or just delete him to free the spot for another attempt at hardcore, or a hero for softcore.
Reworded, as you have to move the character yourself and stays in your active character tab until you do so. Credits to SirCobalt.
Your dead HC characters will take up a character slot UNTIL you move them to the Hall of Fallen Heroes. I have a lvl 25 HC Barb that was my first character until he died on Belial - he still takes up a character slot. However, he has taken on a ghostly hue and you can't do anything but inspect him. Mine is still there just to remind me about my first HC character.
Once you move them to the Hall of Fallen Heroes, as @Philipp stated in his answer, they will not take up a character slot.