fseek函数

fseek函数

说明:本文主要是对man 帮助命令的翻译,若有错误,欢迎指正。

fengjingtu

在linux学习过程中,如果我们遇到一个陌生函数,都会想赶快查一下,你通常是怎么查询linux系统函数和命令的使用方法呢?google?百度?还是使用man命令?其实对于一个初级程序员,学习使用man命令是很有益的,我们可能看到很多网上的说明都是对man帮助文档的翻译。所以,如果你英文不是很差,就自己来翻译一下你想要查询的信息吧!

今天我们就通过这样的方式学习一下fseek这个函数。

打开linux的控制台,我们输入“man fseek”:会进入帮助文档,里面关于fseek的说明是这样的:


FSEEK(3)                                   Linux Programmer's Manual                                   FSEEK(3)



NAME
       fgetpos, fseek, fsetpos, ftell, rewind - reposition a stream

SYNOPSIS
       #include <stdio.h>

   int fseek(FILE *stream, long offset, int whence);

   long ftell(FILE *stream);

   void rewind(FILE *stream);

   int fgetpos(FILE *stream, fpos_t *pos);
   int fsetpos(FILE *stream, fpos_t *pos);

DESCRIPTION
       The  fseek()  function  sets  the  file position indicator for the stream pointed to by stream.  The new
       position, measured in bytes, is obtained by adding offset bytes to the position specified by whence.  If
       whence  is  set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to the start of the file, the
       current position indicator, or end-of-file<
  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值