?? chsize.c
字號:
#include <stdio.h>
#include <io.h>
#include <fcntl.h>
#include <sys\types.h>
#include <sys\stat.h>
void main(void)
{
int handle;
if ((handle = creat("100ZEROS.DAT", S_IWRITE)) == -1)
fprintf(stderr, "Error opening 100ZEROS.DAT");
else
{
if (chsize(handle, 100L))
printf("Error changing file size\n");
close(handle);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -