how to create a new node of a content type when a new node created of another content type? my problem is :
I have a content type called job posting, every job post will associated with a test set that every candidate should write to get qualified for that job i.e., when I create a node of job posting content type another node of type test has to be automatically created. 

what is the best approach towards it. It thought to try actions, but it is won't help me in any way. could any body suggest me a way to do it.
As said by @drupality

function hook_node_insert($node) {
 if ($node-&gt;type != 'job_posting') {
   return;
 }
$node = new stdClass(); // Create a new node object
$node-&gt;type = "test";
node_object_prepare($node); // Set some default values

$node-&gt;title    = "YOUR title";
$node-&gt;language = LANGUAGE_NONE; // Or e.g. 'en' if locale is enabled

$node-&gt;uid = 1; // UID of the author of the node; or use $node-&gt;name

.
.
.//Enter your other field values
.
node_save($node);  
}