i got it...first you have to change the image field settings to upload between 1 to 10 or unlimited than its very easy
foreach($sav_fid as $sn_fid) {
$node->field_image['und'][$cnt_dlt]['fid'] = $sn_fid;
$cnt_dlt++;
}
this will do it
where field_image is the core image field attached to the node api.
['und'] is just a code for language i guess means undefined.
[$cnt_dlt] is a counter variable which initialise 0 than increase by 1 and this part is delta(this number will increase attach the imagae).
[fid] is the field_image reference to the file in the managed_file table.
$sn_fid is the fid(file id) from the managed_file table.
in order to create and attaching picture to a node by using node_save($node); you have upload the file by using file_copy($files); and save the fid by creating an object and saving the result from it.