English

Write the Use of Following File Pointers with an Example : Seekg( ) - Computer Science 1

Advertisements
Advertisements

Question

Write the use of following file pointers with an example :

seekg( )

Answer in Brief
Advertisements

Solution 1

Seekg(): This function is used to search the data byte in a file when the file is opened in read mode.

shaalaa.com

Solution 2

SEEKG() →is used to move the get pointer to a desired location with respect to a reference point.

Syntax : file_pointer.seekg (number of bytes , Reference point);

Example : fin.seekg(10,ios :: beg);

shaalaa.com
  Is there an error in this question or solution?
2017-2018 (March)

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×