void abort( void );
Parameter:
void
Remark:
Hàm abort( ) kết thúc chương trình đang chạy. Dialog lỗi sẽ xuất hiện trên màn hình console.
Ví dụ:
#include "stdio.h" #include "conio.h" #include "stdlib.h" void main( void ) { int a = 9, b = 0; if(b == 0) abort(); else printf("\na/b = %d/%d = %f", a, b, (float)a/b); getch(); }
Kết quả:
Leave a Reply
You must be logged in to post a comment.