C语言函数大全--f开头的函数(下)

2023-11-17

f开头的函数(下)

本篇介绍C语言中f开头的函数(下)

21. floor,floorf,floorl

21.1 函数说明

函数声明 函数功能
double floor (double x); 获取小于或等于 x 的最大整数(double)。
float floorf (float x); 获取小于或等于 x 的最大整数(float)。
long double floorl (long double x) 获取小于或等于 x 的最大整数(long double)。

21.2 演示示例

#include<stdio.h>
#include<math.h>

int main()
{
    double x = 10.24;
    printf("floor(%.2lf) = %.2lf\n", x, floor(x));

    float xf = 5.63;
    printf("floorf(%.2f) = %.2f\n", xf, floorf(xf));

    long double xL = 2.89;
    printf("floorl(%.2Lf) = %.2Lf\n", xL, floorl(xL));
    return 0;
}

21.3 运行结果

在这里插入图片描述

22. _flushall

22.1 函数说明

函数声明 函数功能
int _flushall(void); 清除所有缓冲区,返回打开的流(输入和输出)的数量

22.2 演示示例

#include <stdio.h>

int main()
{
    FILE *stream = fopen("STU.FIL", "w");
    // 清除所有缓冲区
    // 返回打开的流(输入和输出)的数量
    printf("%d streams were flushed.\n", _flushall());
    fclose(stream);
    return 0;
}

22.3 运行结果

在这里插入图片描述

23. fma,fmaf,fmal

23.1 函数说明

函数声明 函数功能
double fma (double x, double y, double z); 计算x*y+z的值,并将结果四舍五入(double)。
float fmaf (float x, float y, float z ); 计算x*y+z的值,并将结果四舍五入(float )。
long double fmal (long double x, long double y, long double z); 计算x*y+z的值,并将结果四舍五入(double)。

23.2 演示示例

#include <stdio.h>
#include <math.h>

int main() {
    
    double x = 2.0, y = 3.0, z = 4.0;
    float xf = 2.0, yf = 3.0, zf = 4.0;
    long double xL = 2.0, yL = 3.0, zL = 4.0;

    printf("fma(%lf, %lf, %lf) = %lf\n", x, y, z, fma(x, y, z));
    printf("fmaf(%f, %f, %f) = %f\n", xf, yf, zf, fmaf(xf, yf, zf));
    printf("fmal(%Lf, %Lf, %Lf) = %Lf\n", xL, yL, zL, fmal(xL, yL, zL));
    
    return 0;
}

23.3 运行结果

在这里插入图片描述

24. fmax,fmaxf,fmaxl

24.1 函数说明

函数声明 函数功能
double fmax (double x, double y); 获取 x 和 y 中的最大值(double)
float fmaxf (float x, float y); 获取 x 和 y 中的最大值(float)
long double fmaxl (long double x, long double y); 获取 x 和 y 中的最大值(long double)

24.2 演示示例

#include<stdio.h>
#include<math.h>

int main()
{
    double x = 10.24, y = 5.63;
    printf("fmax(%.2lf, %.2lf) = %.2lf\n", x, y, fmax(x, y));

    float xf = 5.63, yf = 2.89;
    printf("fmaxf(%.2f, %.2f) = %.2f\n", xf, yf, fmaxf(xf, yf));

    long double xL = 2.89, yL = 4.56;
    printf("fmaxl(%.2Lf, %.2Lf) = %.2Lf\n", xL, yL, fmaxl(xL, yL));
    return 0;
}

24.3 运行结果

在这里插入图片描述

25. fmin,fminf,fminl

25.1 函数说明

函数声明 函数功能
double fmin (double x, double y); 获取 x 和 y 中的最小值(double)
float fminf (float x, float y); 获取 x 和 y 中的最小值(float)
long double fminl (long double x, long double y); 获取 x 和 y 中的最小值(long double)

25.2 演示示例

#include<stdio.h>
#include<math.h>

int main()
{
    double x = 10.24, y = 5.63;
    printf("fmin(%.2lf, %.2lf) = %.2lf\n", x, y, fmin(x, y));

    float xf = 5.63, yf = 2.89;
    printf("fminf(%.2f, %.2f) = %.2f\n", xf, yf, fminf(xf, yf));

    long double xL = 2.89, yL = 4.56;
    printf("fminl(%.2Lf, %.2Lf) = %.2Lf\n", xL, yL, fminl(xL, yL));
    return 0;
}

25.3 运行结果

在这里插入图片描述

26. fmod,fmodf,fmodl

26.1 函数说明

函数声明 函数功能
double fmod (double x, double y); 计算 x 除以 y 的余数(double)。
float fmodf (float x, float y); 计算 x 除以 y 的余数(float)。
long double fmodl (long double x, long double y); 计算 x 除以 y 的余数(long double)。

26.2 演示示例

#include<stdio.h>
#include<math.h>

int main()
{
    double x = 10.24, y = 5.63;
    printf("fmod(%.2lf, %.2lf) = %.20lf\n", x, y, fmod(x, y));

    float xf = 5.63, yf = 2.89;
    printf("fmodf(%.2f, %.2f) = %.20f\n", xf, yf, fmodf(xf, yf));

    long double xL = 2.89, yL = 4.56;
    printf("fmodl(%.2Lf, %.2Lf) = %.20Lf\n", xL, yL, fmodl(xL, yL));
    return 0;
}

26.3 运行结果

在这里插入图片描述

27. fopen

27.1 函数说明

函数声明 函数功能
FILE *fopen(const char *filename, const char *mode); 使用给定的模式mode打开filename所指向的文件。

参数:
filename: 要打开的文件全路径名
mode: 文件访问模式

返回值:
如果文件顺利打开后,指向该流的文件指针就会被返回;否则文件打开失败则返回 NULL,并把错误代码存在 error 中。

文件访问模式

文件访问模式 说明
"r" 以只读模式打开文件,该文件必须存在。
"w" 以只写模式打开文件。若文件不存在则创建该文件。若文件存在则其现有内容将被清除。
"a" 以追加模式打开只写文件。若文件不存在则创建该文件;如果文件存在,则新写入的数据会被加到文件尾后。
"r+" 以读写模式打开文件,该文件必须存在。
"w+" 以读写模式打开文件。若文件不存在则创建该文件。若文件存在则其内容将被清除。
"a+" 以追加模式打开可读写文件。若文件不存在则创建该文件;如果文件存在,则新写入的数据会被加到文件尾后。
"rb" 以只读模式打开一个二进制文件。
"wb" 以只写模式打开或新建一个二进制文件。
"ab" 以追加模式打开一个二进制文件,并在文件末尾写入数据。
"rb+" 以读写模式打开一个二进制文件,该文件必须存在。
"wb+" 以读写模式打开或创建一个二进制文件。
"ab+" 以追加模式打开一个二进制文件,以便在文件末尾写入数据。该文件也是可读的。
"rt" 以只读模式打开一个文本文件。
"wt" 以只读模式打开或创建文本文件。
"at" 以追加模式打开一个文本文件,并在文件末尾写入数据。
"rt+" 以读写模式打开一个文本文件。
"wt+" 以读写模式打开或创建文本文件。
"at+" 以追加模式打开文本文件,以便在文件末尾写入数据。该文件也是可读的。

27.2 演示示例

#include <string.h>
#include <stdio.h>

int main(void)
{
    FILE *fp;
    char buf[30] = "Hello, Huazie 123456789";
    fp = fopen("STU.FIL", "w");
    printf("temp.txt is created and opened\n");
    fwrite(&buf, strlen(buf), 1, fp);
    printf("temp.txt is writed\n");
    fclose(fp);
    printf("temp.txt is closed");
    return 0;
}

27.3 运行结果

在这里插入图片描述

在这里插入图片描述

28. fprintf

28.1 函数说明

函数声明 函数功能
int fprintf(FILE *stream, char *format[, argument,...]); 格式化输出到一个流文件中

28.2 演示示例

#include <stdio.h>

int main()
{
    FILE *stream;
    stream = fopen("temp.txt", "w");
    fprintf(stream, "%s:%d\n", "Hello Huazie", 456);
    fclose(stream);
    return 0;
}

28.3 运行结果

在这里插入图片描述

29. fputc

29.1 函数说明

函数声明 函数功能
int fputc(int ch, FILE *stream); 将字符【ch为字符的ascii码】写到文件指针stream所指向的文件的当前写指针的位置

注意: 在正常调用情况下,函数返回写入文件的字符的 ASCII 码值,出错时,返回 EOF(-1)。当正确写入一个字符或一个字节的数据后,文件内部写指针会自动后移一个字节的位置。EOF是在头文件 stdio.h中定义的宏。

29.2 演示示例

#include <stdio.h>

int main(void)
{
   char msg[] = "Hello Huazie";
   int i = 0;

   while (msg[i])
   {
      fputc(msg[i], stdout);
      i++;
   }
   return 0;
}

29.3 运行结果

在这里插入图片描述

30. fputchar

30.1 函数说明

函数声明 函数功能
int fputchar(char ch); 送一个字符到标准输出流(stdout)中,出错则返回EOF

30.2 演示示例

#include <stdio.h>

int main(void)
{
   char msg[] = "This is a test";
   int i = 0;

   while (msg[i])
   {
      fputchar(msg[i]);
      i++;
   }
   return 0;
}

30.3 运行结果

在这里插入图片描述

31. fputs

31.1 函数说明

函数声明 函数功能
int fputs(const char *str, FILE *stream); 把字符串写入到指定的流( stream) 中,但不包括空字符。

注意: fputs 函数如果成功则返回 0,如果发生错误则返回 EOF(-1)

31.2 演示示例

#include <stdio.h>

int main()
{
   int result = fputs("Hello Huazie\n1234", stdout);
   printf("\nresult = %d", result);
   return 0;
}

31.3 运行结果

在这里插入图片描述

32. fread

32.1 函数说明

函数声明 函数功能
int fread(void *buffer, int size, int count, FILE *stream); 从给定输入流stream读取最多count个对象到数组buffer中

参数:
buffer : 指向要读取的数组中首个对象的指针
size : 每个对象的大小(单位是字节)
count : 要读取的对象个数
stream : 指定输入流

返回值:
返回成功读取的对象个数,若出现错误或到达文件末尾,则可能小于count。
sizecount 为零,则 fread 返回零且不进行其他动作。
fread 不区分文件尾和错误,因此调用者必须用 feofferror 才能判断发生了什么。

注意: 如果读取成功,流的文件位置指示器前进读取的字节数;否则出现错误,则流的文件位置指示器的位置不确定。同样若没有完整地读入最后一个元素,则其值也不确定。

32.2 演示示例

#include <string.h>
#include <stdio.h>

int main(void)
{
    FILE *stream;
    char msg[20] = "Hello, Huazie";
    char buf[20];

    // 以读写模式打开文件。若文件不存在则创建该文件。若文件存在则其内容将被清除。
    if ((stream = fopen("temp.txt", "w+")) == NULL)
    {
        fprintf(stderr, "Cannot open output file.\n");
        return 1;
    }
    // 向文件流中写入数据
    fwrite(msg, strlen(msg)+1, 1, stream);
    // 重定位流上的文件指针到文件开头
    fseek(stream, SEEK_SET, 0);
    // 从文件流中读取数据
    fread(buf, strlen(msg)+1, 1, stream);
    printf("%s\n", buf);

    fclose(stream);
    return 0;
}

32.3 运行结果

在这里插入图片描述

33. free

33.1 函数说明

函数声明 函数功能
void free(void *ptr); 释放ptr指向的存储空间

注意: 被释放的空间通常被送入可用存储区池,以后可以在调用 mallocrealloc 以及 calloc 函数来再分配。

33.2 演示示例

#include <stdio.h>
#include <string.h>
#include <malloc.h>
int main()
{
    char *str;
    str = (char *) malloc(7); 
    strcpy(str, "huazie");
    printf("string = %-10s, Address = %u, len = %d\n", str, str, strlen(str));
    str = (char *) realloc(str,25); //重新分配内存
    strcat(str, ".com");
    printf("string = %-10s, Address = %u, len = %d\n", str, str, strlen(str));
    free(str);// 释放已分配的内存空间
    //内存空间释放后,该空间上的值未知
    printf("string = %-10s, Address = %u, len = %d\n", str, str, strlen(str));
    return 0;
}

33.3 运行结果

在这里插入图片描述

34. freopen

34.1 函数说明

函数声明 函数功能
FILE * freopen(const char *filename, const char *mode, FILE *stream); 以指定模式重新指定到另一个文件

参数:
filename: 需要重定向到的文件名或文件路径。
mode: 代表文件访问权限的字符串。 参见 27 fopen
stream: 需要被重定向的文件流。

34.2 演示示例

#include<stdio.h>
int main()
{
    if(freopen("temp.txt", "w", stdout) == NULL)
        fprintf(stderr,"error redirecting stdout\n");
    printf("Hello, %s", "Huazie");
    fclose(stdout);
    return 0;
}

34.3 运行结果

在这里插入图片描述

35. frexp,frexpf,frexpl

35.1 函数说明

函数声明 函数功能
double frexp (double x, int * exp); 将x 分解为有效位 和 2 的整数指数。(double)。
float frexpf (float x, int * exp); 将x 分解为有效位 和 2 的整数指数。(float)。
long double frexpl (long double x, int * exp); 将x 分解为有效位 和 2 的整数指数。(long double)。

注意: 有效位的绝对值范围为 0.5(包括)1(不包括)。x = 有效位 * 2 e x p 2^{exp} 2exp

35.2 演示示例

#include<stdio.h>
#include<math.h>

int main()
{
    int exp;
    double x = 10.24;
    printf("frexp(%.2lf, exp = %d) = %.20lf\n", x, exp, frexp(x, &exp));

    float xf = 5.63;
    printf("frexpf(%.2f, exp = %d) = %.20f\n", xf, exp, frexpf(xf, &exp));

    long double xL = 2.89;
    printf("frexpl(%.2Lf, exp = %d) = %.20Lf\n", xL, exp, frexpl(xL, &exp));
    return 0;
}

35.3 运行结果

在这里插入图片描述

36. fscanf

36.1 函数说明

函数声明 函数功能
int fscanf(FILE *stream, char *format[,argument...]); 从一个流中执行格式化输入

注意: fscanf 遇到空格和换行时结束。它与 fgets 有区别,fgets 遇到空格不结束。

36.2 演示示例

#include <stdlib.h>
#include <stdio.h>

int main(void)
{
   int i;
   printf("Input an integer: ");
   if (fscanf(stdin, "%d", &i))
      printf("The integer is: %d\n", i);
   else
   {
      fprintf(stderr, "Error reading an integer from stdin.\n");
      exit(1);
   }
   return 0;
}

36.3 运行结果

在这里插入图片描述

37. fseek

37.1 函数说明

函数声明 函数功能
int fseek(FILE *stream, long offset, int fromwhere); 重定位流上的文件指针位置

注意: 如果执行成功,stream 将指向以 fromwhere【偏移起始位置:文件头 0(SEEK_SET),当前位置 1(SEEK_CUR),文件尾2(SEEK_END) 】为基准,偏移 offset(指针偏移量)个字节的位置。如果执行失败(比如 offset 超过文件自身大小),则不改变 stream 指向的位置。

37.2 演示示例

#include <stdio.h>

long filesize(FILE *stream);

int main(void)
{
    FILE *stream = fopen("temp.txt", "w+");
    fprintf(stream, "This is a test");
    printf("The size of temp.txt is %ld bytes\n", filesize(stream));
    fclose(stream);
    return 0;
}

long filesize(FILE *stream)
{
    long curpos, length;
    // 文件指针当前位置相对于文件首的偏移字节数
    curpos = ftell(stream);
    // 重定向文件指针到文件尾,偏移量 0
    fseek(stream, 0L, SEEK_END);
    length = ftell(stream);
    return length;
}

37.3 运行结果

在这里插入图片描述
在这里插入图片描述

38. fsetpos

38.1 函数说明

函数声明 函数功能
int fsetpos(FILE *stream, const fpos_t *pos); 将文件指针定位在pos指定的位置上。如果成功返回0,否则返回非0。

38.2 演示示例

#include <stdlib.h>
#include <stdio.h>

void showpos(FILE *stream);

int main(void)
{
    FILE *stream;
    fpos_t filepos;

    stream = fopen("STU.FIL", "w+");
    // 获取当前文件指针的位置
    fgetpos(stream, &filepos);
    fprintf(stream, "This is a test");
    // 展示当前文件指针的位置
    showpos(stream);

    /* set a new file position, display it */
    if (fsetpos(stream, &filepos) == 0)
        showpos(stream);
    else
    {
        fprintf(stderr, "Error setting file pointer.\n");
        exit(1);
    }

    fclose(stream);
    return 0;
}

void showpos(FILE *stream)
{
    fpos_t pos;
    // 展示当前文件指针的位置
    fgetpos(stream, &pos);
    printf("File position: %ld\n", pos);
}

38.3 运行结果

在这里插入图片描述

39. fstat

39.1 函数说明

函数声明 函数功能
int fstat(int handle,struct stat *buf); 由文件描述符获取文件状态

39.2 演示示例

#include <sys\stat.h>
#include <stdio.h>
#include <time.h>

int main()
{
    struct stat statbuf;
    FILE *stream;

    if ((stream = fopen("STU.FIL", "w+")) == NULL)
    {
        fprintf(stderr, "Cannot open output file.\n");
        exit(1);
    }
    fprintf(stream, "This is a test");
    fflush(stream);

    // get information about the file
    fstat(fileno(stream), &statbuf);
    fclose(stream);

    if (statbuf.st_mode & S_IFCHR)
        printf("Handle refers to a device.\n");
    if (statbuf.st_mode & S_IFREG)
        printf("Handle refers to an ordinary file.\n");
    if (statbuf.st_mode & S_IREAD)
        printf("User has read permission on file.\n");
    if (statbuf.st_mode & S_IWRITE)
        printf("User has write permission on file.\n");
	// 不知道为啥,我这里文件的驱动号是空
    printf("Drive letter of file: %c\n", statbuf.st_dev);
    printf("Size of file in bytes: %ld\n", statbuf.st_size);
    printf("Time file last opened: %s\n", ctime(&statbuf.st_ctime));
    return 0;
}

39.3 运行结果

在这里插入图片描述

40. ftell

40.1 函数说明

函数声明 函数功能
long ftell(FILE *stream); 获取文件指针当前位置相对于文件首的偏移字节数

40.2 演示示例

#include <stdio.h>

int main(void)
{
   FILE *stream = fopen("temp.txt", "w+");
   fprintf(stream, "This is a test");
   printf("The file pointer is at byte %ld\n", ftell(stream));
   fclose(stream);
   return 0;
}

40.3 运行结果

在这里插入图片描述

41. fwrite

41.1 函数说明

函数声明 函数功能
int fwrite(const void *ptr, int size, int nitems, FILE *stream); 把ptr所指向的数组中的数据写入到给定流stream中

参数:
ptr: 指向要被写入的元素数组的指针。
size: 要被写入的每个元素的大小,以字节为单位。
nitems: 元素的个数,每个元素的大小为 size 字节。
stream: 指向 FILE 对象的指针,该 FILE 对象指定了一个输出流。

注意: 如果写入成功,fwrite 返回一个 size_t 对象,表示元素的总数,该对象是一个整型数据类型。如果该数字与 nitems 参数不同,则会显示一个错误。

41.2 演示示例

#include <stdio.h>

struct mystruct
{
    int i;
    char ch;
};

int main(void)
{
    FILE *stream;
    struct mystruct s;
    // 以只写模式打开或新建一个二进制文件。
    if ((stream = fopen("test.txt", "wb")) == NULL) 
    {
        fprintf(stderr, "Cannot open output file.\n");
        return 1;
    }
    s.i = 0;
    s.ch = 'A';
    fwrite(&s, sizeof(s), 1, stream); 
    fclose(stream); 

    // 以只读模式打开或新建一个二进制文件。
    if ((stream = fopen("test.txt", "rb")) == NULL) 
    {
        fprintf(stderr, "Cannot open output file.\n");
        return 1;
    }
    struct mystruct s1;
    fread(&s1, sizeof(s1), 1, stream);
    printf("%d %c", s1.i, s1.ch);
    fclose(stream);

    return 0;
}

41.3 运行结果

在这里插入图片描述

参考

  1. [API Reference Document]
  2. [IO-标准C库]
  3. [fread]
  4. [freopen]
  5. [fseek]
  6. [fwrite]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

C语言函数大全--f开头的函数(下) 的相关文章

  • C语言函数大全-- w 开头的函数(1)

    w 开头的函数 1 1 wcscat 1 1 函数说明 1 2 演示示例 1 3 运行结果 2 wcschr 2 1 函数说明 2 2 演示示例 2 3 运行结果 3 wcscmp 3 1 函数说明 3 2 演示示例 3 3 运行结果 4
  • C语言函数大全-- _w 开头的函数(4)

    w 开头的函数 4 1 wstrtime 1 1 函数说明 1 2 演示示例 1 3 运行结果 2 wstrtime s 2 1 函数说明 2 2 演示示例 2 3 运行结果 3 wsetlocale 3 1 函数说明 3 2 演示示例 3
  • C语言函数大全-- x 开头的函数(3)

    x 开头的函数 3 1 xdr opaque 1 1 函数说明 1 2 演示示例 2 xdr opaque auth 2 1 函数说明 2 2 演示示例 2 2 1 opaque auth 2 2 2 test c 3 xdr pointe
  • C语言函数大全-- l 开头的函数

    l 开头的函数 1 labs llabs 1 1 函数说明 1 2 演示示例 1 3 运行结果 2 ldexp ldexpf ldexpl 2 1 函数说明 2 2 演示示例 2 3 运行结果 3 ldiv lldiv 3 1 函数说明 3
  • C语言函数大全-- l 开头的 Linux 内核函数(链表管理函数)

    l 开头的 Linux 内核函数 链表管理函数 1 list add list add tail 1 1 函数说明 1 2 演示示例 2 list cut before list cut position 2 1 函数说明 2 2 演示示例
  • C语言函数大全-- s 开头的函数(3)

    s 开头的函数 3 1 sleep 1 1 函数说明 1 2 演示示例 1 3 运行结果 2 sopen 2 1 函数说明 2 2 演示示例 2 3 运行结果 3 sound 3 1 函数说明 3 2 演示示例 4 spawnl 4 1 函
  • C语言函数大全-- s 开头的函数(2)

    s 开头的函数 2 1 setlinestyle 1 1 函数说明 1 2 演示示例 1 3 运行结果 2 setmem 2 1 函数说明 2 2 演示示例 3 setmode 3 1 函数说明 3 2 演示示例 3 3 运行结果 4 se
  • C语言函数大全-- x 开头的函数(5)

    x 开头的函数 5 1 xdrmem create 1 1 函数说明 1 2 演示示例 2 xdrmem destroy 2 1 函数说明 2 2 演示示例 3 xdrrec create 3 1 函数说明 3 2 演示示例 4 xdrre
  • C语言函数大全-- u 开头的函数

    u 开头的函数 1 ultoa 1 1 函数说明 1 2 演示示例 1 3 运行结果 2 ungetc 2 1 函数说明 2 2 演示示例 2 3 运行结果 3 ungetch 3 1 函数说明 3 2 演示示例 3 3 运行结果 4 un
  • C语言函数大全-- t 开头的函数

    t 开头的函数 1 tan tanf tanl 1 1 函数说明 1 2 演示示例 1 3 运行结果 2 tanh tanhf tanhl 2 1 函数说明 2 2 演示示例 2 3 运行结果 3 tell 3 1 函数说明 3 2 演示示
  • C语言函数大全-- v 开头的函数

    v 开头的函数 1 va start 1 1 函数说明 1 2 演示示例 1 3 运行结果 2 va arg 2 1 函数说明 2 2 演示示例 3 va copy 3 1 函数说明 3 2 演示示例 4 va end 4 1 函数说明 4
  • C语言函数大全--e开头的函数

    e开头的函数 1 ecvt 1 1 函数说明 1 2 演示示例 1 3 运行结果 2 ellipse 2 1 函数说明 2 2 演示示例 2 3 运行结果 3 eof 3 1 函数说明 3 2 演示示例 3 3 运行结果 4 execl 4
  • C语言函数大全-- x 开头的函数(1)

    x 开头的函数 1 1 xdr accepted reply 1 1 函数说明 1 2 演示示例 1 2 1 accepted reply 1 2 2 Test c 2 xdr array 2 1 函数说明 2 2 演示示例 3 xdr a
  • C语言函数大全-- k 开头的函数

    k 开头的函数 1 kcalloc 1 1 函数说明 1 2 演示示例 2 kbhit 2 1 函数说明 2 2 演示示例 2 3 运行结果 3 keep 3 1 函数说明 3 2 演示示例 4 kernel thread 4 1 函数说明
  • C语言函数大全-- r 开头的函数

    r 开头的函数 1 raise 1 1 函数说明 1 2 演示示例 1 3 运行结果 2 rand 2 1 函数说明 2 2 演示示例 2 3 运行结果 3 read 3 1 函数说明 3 2 演示示例 3 3 运行结果 4 realloc
  • C语言函数大全-- y 开头的函数

    y 开头的函数 1 yperror 1 1 函数说明 1 2 演示示例 2 yp match 2 1 函数说明 2 2 演示示例 3 y0 零阶第二类贝塞尔函数 3 1 函数说明 3 2 演示示例 3 3 运行结果 4 y1 一阶第二类贝塞
  • C语言函数大全--f开头的函数(下)

    f开头的函数 下 21 floor floorf floorl 21 1 函数说明 21 2 演示示例 21 3 运行结果 22 flushall 22 1 函数说明 22 2 演示示例 22 3 运行结果 23 fma fmaf fmal
  • C语言函数大全-- i 开头的函数

    i 开头的函数 1 imagesize 1 1 函数说明 1 2 演示示例 1 3 运行结果 2 initgraph 2 1 函数说明 2 2 演示示例 2 3 运行结果 3 inport 3 1 函数说明 3 2 演示示例 4 insli
  • C语言函数大全-- s 开头的函数(4)

    s 开头的函数 4 1 strdup 1 1 函数说明 1 2 演示示例 1 3 运行结果 2 stricmp 2 1 函数说明 2 2 演示示例 2 3 运行结果 3 strerror 3 1 函数说明 3 2 演示示例 3 3 运行结果
  • C语言函数大全-- x 开头的函数(4)

    x 开头的函数 4 1 xdr struct 1 1 函数说明 1 2 演示示例 2 xdr u char 2 1 函数说明 2 2 演示示例 3 xdr u hyper 3 1 函数说明 3 2 演示示例 4 xdr u int 4 1

随机推荐

  • ElasticSearch6.x 之IK 分词

    IK分词器介绍 elasticsearch analysis ik git地址 https github com medcl elasticsearch analysis ik 分词方式 Analyzer ik smart ik max w
  • pycharm 有些库(函数)没有代码提示的解决办法

    问题描述 如图 输入变量im 后没有关于第三方库相应的函数或其他提示 当然 此文档的前提是有相关的函数说明以及已有相关设置等 解决方案 python是动态强类型语言 IDE无法判断Image open Me jpg 的返回值类型 无法根据参
  • Git密钥配置

    一 下载并安装Git 官网下载地址点击这里 二 打开git bash 选择一个空文件夹 右键选择 Git Bash Here 三 配置密钥 在Git Bash界面输入git命令 初始化自己的用户名和邮箱 git config global
  • C# string类型(引用类型)

    C string类型 引用类型 2016年03月31日 10 34 45 阅读数 966 sing类型 引用类型 名称 CTS类型 说明 string System String Unicode字符串 string str1 hello s
  • Python教程:类的继承——深入理解继承的概念和用法

    Python教程 类的继承 深入理解继承的概念和用法 类的继承是面向对象编程中的重要概念 它允许我们定义一个新的类 并从现有的类中继承属性和方法 这种继承关系可以让我们在代码中实现代码重用 提高代码的可维护性和可扩展性 在本文中 我们将深入
  • k8s非高可用环境搭建

    k8s非高可用环境搭建 文章目录 k8s非高可用环境搭建 环境准备 集群信息 1 节点规划 2 修改hostname 3 添加hosts解析 4 调整系统配置 5 安装docker 部署kubernetes 1 安装kubernetes k
  • Python 一篇入门

    目录 Python 的简介与特点 Python支持多种编程风格 解释运行 跨平台 可扩展强 可嵌入 丰富的库 Python版本选择 Python开发环境搭建 认识Python解释器 快速入门 变量和赋值 动态类型 变量命名规则 认识 数字
  • Android DataStore 使用详解

    转载请标明出处 http blog csdn net zhaoyanjun6 article details 127358235 本文出自 赵彦军的博客 文章目录 概述 使用 DataStore 本地数据 查看DataStore 文件 Ke
  • Eclipse中JUnit的安装及初始使用

    JUnit的下载 安装 1 下载 http www junit org JUnit软件包 版本很多 可以自行选择 2 在eclipse中添加junit jar包 打开eclipse gt 菜单栏点击project gt properties
  • ubuntu pip intall出现“设备上没有空间”的解决办法

    原因 空间问题呗 东西太多了 tmp盘不够大 pip install的时候文件包会预先下载到tmp盘 步骤1 在home目录下新建一个tmp文件夹 用来取代系统根目录的tmp文件夹 步骤2 设置环境变量TMPDIR export TMPDI
  • [LeetCode-02]-Add Two Numbers-性能极好

    文章目录 题目相关 Solution 1 错误的解法 2 正确解法 3 几个用例 后记 每周完成一个ARTS Algorithm Review Tip Share ARTS Algorithm 每周至少做一个 leetcode 的算法题 R
  • 强化学习打卡班第四五章

    强化学习打卡班第四五章 第四章 Policy Gradient梯度策略 例子 贝叶斯公式补充 奖励函数 reward function 最大化方法 梯度上升 PPO算法 从 On policy 到 Off policy 第四章 Policy
  • Linux 使用wget 命令下载JDK的方法

    Oracle官网上下载jdk 需要点击accept licence的才能下载 使用下面的命令 直接可以下载 wget no check certificate no cookies header Cookie oraclelicense a
  • DeBlurGANv2图像去模糊 训练自己的数据集

    之前在有位博主的DeblurGANv2教程的页面下留了言 很多小伙伴来私信我 config yaml怎么调参数 predict py和train py需要怎么修改 之前只跑了predict 有些问题也没办法解答 最近自己跑了一下train
  • MTU 和 MSS 区别

    MTU Maximum Transmit Unit 最大传输单元 即物理接口 数据链路层 提供给其上层 通常是IP层 最大一次传输数据的大小 以普遍使用的以太网接口为例 缺省MTU 1500 Byte 这是以太网接口对IP层的约束 如果IP
  • HPE Microserver GEN10升级BIOS

    到手的机子BIOS版本还是ZA10A290 非常有必要升级 便从HPE官网下载了最新的版本 ZA10A360 选择UEFI Shell方式更新 官网下载地址 https support hpe com hpesc public km pro
  • Cutter - Web视频剪辑工具原理浅析

    大厂技术 坚持周更 精选好文 最近一直在开发 web视频剪辑工具 cutter 这个工具可以方便老师们编辑拍摄好的视频 这是一个挺有意思的项目 预计分多章和大家分享介绍 本期主要介绍下其大体流程 方便大家对其原理有一个简单认知 Cutter
  • Docker安全设置

    Docker安全 Linux内核的命名空间机制提供的容器隔离安全 Linux控制组机制对容器资源的控制能力安全 Linux内核的能力机制所带来的操作权限安全 Docker程序 特别是服务端 本身的抗攻击性 其他安全增强机制对容器安全性的影响
  • elementui不生效

    1 element依赖vue 引入element js之前要引入vue js 2 element无法脱离Vue使用 html中必须new Vue el app 挂载上去
  • C语言函数大全--f开头的函数(下)

    f开头的函数 下 21 floor floorf floorl 21 1 函数说明 21 2 演示示例 21 3 运行结果 22 flushall 22 1 函数说明 22 2 演示示例 22 3 运行结果 23 fma fmaf fmal