Computer Knowledge
Computer File Systems
1,516 Questions
Computer file systems dictate how data is stored, organized, and retrieved on storage devices. Important concepts include file allocation tables, access mechanisms, and various formats like sequential and video files. Candidates preparing for banking and government exams should practice these fundamentals thoroughly.
File access mechanismsVideo and password filesFile extensionsFile allocation tableSystem metadata
Computer File Systems Questions
-
Web.config file
-
ASPX file
-
ASCX file
-
The parameter file
-
The archive file
A
Correct answer
Explanation
This file is partitioned into two sections, such as appSettings section and system. web section.
-
Random access file takes less time for reading than a sequential file.
-
getw() function reads all data types from a file.
-
Closall() function closes all the opened files in a program.
-
ofstream is a class to read the data from a file.
-
None of these
-
name
-
filename
-
description
-
mimetypes
-
path
E
Correct answer
Explanation
Path is not a valid property of the 'plugin' object.
-
seekp()
-
rewind()
-
ftell()
-
fseek()
-
fread()
D
Correct answer
Explanation
The fseek() is used to move the pointer at any position in a file. It is used in programs where we want to read or write data from/to a specific position in a file. It has the following syntax -
fseek(filepointer,int bytes,int offset)
where
file pointer is a pointer pointing to a file.
bytes - is the number of bytes that we want to move.
offset - denotes the position from where we want to move.for example
fseek(fp,10,0)
will move the pointer 10 bytes from the beginning.
C
Correct answer
Explanation
The a+ mode opens a text file for reading and writing both. It creates the file if it does not exist. The reading will start from the beginning but writing can only be appended.
-
InputStream
-
InputStreamReader
-
FileInputstream
-
StreamReader
C
Correct answer
Explanation
The openFileInput() method returns a FileInputStream (note the specific capitalization with lowercase 'stream'), which is used to read bytes from a file stored in the app's internal storage. It does not return the abstract InputStream or character-based Reader classes.
-
read data from file
-
write data to file
-
Both (1) and (2)
-
None of these
B
Correct answer
Explanation
The openFileOutput() method is used to write data to a file in the app's internal storage. It returns a FileOutputStream. For reading, you would use openFileInput(). These are separate operations - openFileOutput() is specifically for writing, not reading or both.
-
Both (a) and (b)
-
Only (a)
-
Only (b)
-
None of these
A
Correct answer
Explanation
The Java File constructor can accept both directory paths and file paths - it represents an abstract path that may refer to either. File objects can be used to check status of both directories (via isDirectory()) and regular files (via isFile()).
-
Collection of executable and external resources
-
Android executable file
-
Android byte code file
-
Java byte code file
-
Java executable file
A
Correct answer
Explanation
The android package file (.apk) contains the executable and external resources in a packaged format after compilation of the android application.
-
Content Providers represent files as fully qualified URIs.
-
openOutputStream method is used to insert a file into a Content Provider.
-
openInputStream method is used to access a saved file.
-
The file compresses the bitmap and saves it into the provider.
-
There will be no exception possible while saving the file.
E
Correct answer
Explanation
The FileNotFoundException is possible while saving the file.
-
One must save all the projects in manifest file.
-
All the backup versions will be stored in manifest file under manifest directory.
-
All the components of an android application must be declared in Androidmanifest.xml file.
-
There is no manifest file in android development.
A
Correct answer
Explanation
It is present in bin directory of project.
-
Res
-
Classes
-
DexedLibs
-
Libs
D
Correct answer
Explanation
The bin directory has res, classes and dexedLibs.
-
BuildConfig.java
-
AndroidManifest.xml
-
<activity>.java
-
R.java
D
Correct answer
Explanation
The file R.java is an auto-generated file that is added to your application by the android plugin.
D
Correct answer
Explanation
There are four Android Project Folder Structure:
1. src/
2. res/
3. gen/
4. assets/