C Reference
Blog
  • C Reference
  • Overview
    • 🌱Intro
    • 🌻Overview
    • πŸ•’Execution
  • Input-Output
    • βš›οΈData type
    • πŸ”§Expression
    • ✍️Input
    • πŸͺŸOutput
  • Beginner
    • βš–οΈCondition
    • πŸ”Loop
    • πŸŽ’Array
    • πŸ“šString
    • πŸ“¨Function
  • Intermidiate
    • 🏨Structure
    • πŸ“ŒPointer
    • πŸ’ΌFile management
      • putc and getc
      • multiple character
      • fprintf and fscanf
      • Error handling
      • feof and ferror
      • Random access
      • Command line arguments
  • Advanced
    • πŸŽ‘Memory allocation
    • πŸ“½οΈPreprocessor
Powered by GitBook
On this page
  • rewind(FP)
  • ftell(FP)
  • fseek(FP, offset, init_position)

Was this helpful?

Edit on GitHub
  1. Intermidiate
  2. πŸ’ΌFile management

Random access

rewind(FP)

sets the position back to 0

ftell(FP)

gives the current position

fseek(FP, offset, init_position)

offset can be both positive and negative,

position,

init_position
value

0

Beginning

1

Current position

2

End

Previousfeof and ferrorNextCommand line arguments

Last updated 1 year ago

Was this helpful?