Get node id of saved node I want a function/hook to be called at a point just when my custom node type is saved, I want to get the generated node id in that function, as I have to perform some operations based on nid.

I know one solution is which form alter hook is defined and I give a custom submit function to it and that function is called just when form is submitted, but in that case node is not yet saved at that point so there is no nid.
You can use hook_node_update().

In Drupal 6, you can easily get the last node ID by calling db_last_insert_id().