например, рассмотрим следующий код
int main(int argc,char *argv[])
{
int *p,*q;
p = (int *)malloc(sizeof(int)*10);
q = (int *)malloc(sizeof(int)*10);
if (p == 0)
{
printf("ERROR: Out of memory\n");
return 1;
}
if (q == 0)
{
printf("ERROR: Out of memory\n");
exit(0);
}
return 0;
}
что возвращает 0, return 1, exit (0) сделать в вышеуказанной программе. exit (0) выйдет из общей программы, и управление выходит из цикла, но что произойдет в случае возврата 0, return 1, return -1.