quick code snippet for printing sub categories for a given category..
$category = Mage::getModel('catalog/category')->getCategories(40);
foreach($category as $_category){
$currentCat = Mage::getModel(‘catalog/category’)->load($_category->getId());
?>