background image

perror("Disk problem");
exit(1);
}
printf("Read OK\n");
strt = 3;
for (i=0; i<80; i++)
{
ch_out = buf[strt+i];
putchar(ch_out);
}
printf("\n");
return(0);
}
函数名: access

 

功 能: 确定文件的访问权限

 

用 法: int access(const char *filename, int amode);
程序例:
#include <stdio.h>

#include <io.h>
int file_exists(char *filename);
int main(void)
{
printf("Does NOTEXIST.FIL exist: %s\n", file_exists("NOTEXISTS.FIL") ? "YES" : 
"NO");
return 0;
}
int file_exists(char *filename)
{
return (access(filename, 0) == 0);
}
函数名: acos

 

功 能: 反余弦函数

 

用 法: double acos(double x);
程序例:
#include <stdio.h>
#include <math.h>
int main(void)
{
double result;
double x = 0.5;
result = acos(x);
printf("The arc cosine of %lf is %lf\n", x, result);
return 0;