aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java I/O and Servlets
  • If obj is an instance of Random Access File, how can we m...
Multiple choice

If obj is an instance of Random Access File, how can we move the file pointer to the end of the file?

  1. obj.seek(obj.length())

  2. obj.seek(EOF())

  3. seek(obj.length())

  4. none of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To move the file pointer to the end, you use the seek() method with the length of the file as the argument.

Keep practicing — related questions

  • Which of the following methods in Random Access Files return the current location of the file pointer?
  • Which statement takes the file pointer to the beginning of the file?
  • Which of the following functions give the current position of the file pointer?
  • Which of the following methods in Java sets the file pointer to a particular location inside the file?
  • Which class in the java.io package implements a random access file?
  • Where is the file pointer fp pointing to after below mentioned statement? fseek(fp, 49, sizeof (Variable ty...
  • FILE *f = fopen( fileName, "r" ); readData( f ); if( ???? ) { puts( "End of file was reached" ); } Which on...
  • Code: FILE *f = fopen( fileName, "r" ); readData( f ); if( ???? ) { puts( "End of file was reached" ); } Wh...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy