Get Category URL from Category ID in Magento

Very simple job, just follow below code

$cat_id = 3; // predefined category ID
echo cat_url = Mage::getModel(“catalog/category”)->load($cat_id)->getUrl();