$post_id = wp_insert_post( $arg ); #returns post ID
$permalink = get_permalink( $post_id ); #returns the permalink
Codex:
http://codex.wordpress.org/Function_Reference/wp_insert_post
$post_id = wp_insert_post( $arg ); #returns post ID
$permalink = get_permalink( $post_id ); #returns the permalink
Codex:
http://codex.wordpress.org/Function_Reference/wp_insert_post