Create a node Programmatically having Composed Field
Consider with this example
you created a field as contact with two subfields as mobile(textfield) and home(textfield).

so while creating the node pro grammatically you just have to assign the array of your input to the field,something like below

$contact = array("mobile"=&gt;"1234565","home"=&gt;"789");
$node-&gt;field_contact[$node-&gt;language][0]['composed'] = $contact; 


I have not shared the node_save() as you have mentioned you are able to make it.