exit(1); /*这里什么意思*/
#include <stdio.h>
#include <stdlib.h>
#define NULL 0
main()
{
int *p,*table;
int size;
printf( "\nWhat is the size of table? ");
scanf( "%d ",&size);
printf( "\n ");
if ((table=(int *) malloc(sizeof(int))) ==NULL)/*分配出来的内存的第一个地址
赋给类型为int的指针table*/
{
printf( "No space available \n ");
exit(1); /*这里什么意思*/
}
printf( "\n Address of the first byte is %u\n ",table);
printf( "\nInput table values \n ");
for (p=table;p <table+size;p++)
scanf( "%d ",p);
for (p=table+size-1;p> =table;p--)
printf( "%d is stored at address %u\n ",*p,p);
system( "pause ");
clrscr();
[解决办法]
exit(1); /*这里什么意思*/
退出程序
[解决办法]
exit(1); /*这里什么意思*/
退出程序, 1表示有错误, 本程序中表示内存分配失败
[解决办法]
exit(0); 表示正常推出。 相当于return 语句
exit(a);a> 0表示,因为发生了某种错误而退出。