I have a problem in my single product view page the related product not displaying the out of stock product but in category list it display all products including out of stock product
This is normal behaviour. The file app/design/frontend/base/default/template/catalog/product/list/related.phtml has a check for $_item->isSaleable() and items that are out of stock are not saleable so they won't show. If you want to show out of stock products as related products copy this file to your theme and remove the isSaleable() check.