How to get related nodes for node reference? I have added related nodes using Node Reference module provided by the references module.
Now I want to retrieve all the related nodes. So I am looking for a function which takes a node id as input and returns all the related nodes.

Is there any function provided by Drupal API or reference module which helps me getting nodes related to a node? 

I tried searching in the module functions but I found nothing.
I don't know of an API function specifically for that but it's fairly simple to implement one using existing API methods:

function get_related_nodes($master_nid, $field_name) {
  // Load the 'master' node
  $master_node = node_load($master_nid);

  // Get the node reference items attached to this node
  $items = field_get_items('node', $node, $field_name);

  // Loop through and grab the nids
  $nids = array();
  foreach ($items as $item) {
    $nids[] = $item['nid'];
  }

  // Return the fully loaded reference nodes
  return node_load_multiple($nids);
}