If you use the the_category to display categories then you can use the parents argument of multiple. Example
<?php the_category(', ','multiple') ?>
Just as a note, by WordPress standards, ANY category that has been designated a Parent category is not meant to be checked in the category hierarchy when writing posts. Meaning, only the latest generation category should be checked. Think of it like this, only the youngest generation gets the action.
It's okay to have multiple categories assigned a post, as long as the other categories are not designated as parents.