What are the ways of storing data in Files?

1 Answer

Answer :

Ans: There are two ways of storing data in files
1. Text Format- In text format data is stored as a line of character with each line terminated by a new line character (‘\n’). Text files are in human readable form and they can be created and read using any text editor.
2. Binary Format- In binary format, data is stored on the disk same way as it is represented in the computer memory.Binary files are not in human readable form they and can be created and read by a specific program written for them .The binary data stored in the file can’t be read by any editor. The input and output operation in binary files take less time as compared to that of the text files because in binary files no conversion have to take place .However the data written using binary format is not very portable since the size of data types and byte order may be different on different machine. In text format , these problem do not arise,and hence it is more portable.

Related questions

Description : In an ER model, ……………. is described in the database by storing its data. A) Entity B) Attribute C) Relationship D) Notation

Last Answer : A) Entity

Description : Repository of information gathered from multiple sources, storing under unified scheme at a single site is called as (A) Data mining (B) Meta data (C) Data warehousing (D) Database

Last Answer : (C) Data warehousing

Description : What is first step to Handle Retrieving Data from an Encrypted Hard Drive? A. Formatting disk B. Storing data C. Finding configuration files. D. Deleting files.

Last Answer : C. Finding configuration files. 

Description : The methods or algorithms which are used to increase the performance of disk storage sub-system is called ............. A) Disk performing B) Disk scheduling C) Disk storing D) Disk extending

Last Answer : B) Disk scheduling

Description : Data input is A) an abstract class defined in java.io B) a class we can use to read primitive data types C) an interface that defines methods to open files. D) an interface that defines methods to read primitive data types.

Last Answer : D) an interface that defines methods to read primitive data types.

Description : Data input is A) an abstract class defined in java.io B) a class we can use to read primitive data types C) an interface that defines methods to open files. D) an interface that defines methods to read primitive data types.

Last Answer : D) an interface that defines methods to read primitive data types.

Description : ………… system consists of programs, data files and documentation A) Conceptual B) Logical C) Physical D) None of the above

Last Answer : C) Physical

Description : It is better to use files than a DBMS when there are (A) Stringent real-time requirements. (B) Multiple users wish to access the data. (C) Complex relationships among data. (D) All of the above.

Last Answer : (B) Multiple users wish to access the data.

Description : Data Integrity control uses ................ (A) Upper and lower limits on numeric data. (B) Passwords to prohibit unauthorised access to files. (C) Data dictionary to keep the data (D) Data dictionary to find last access of data

Last Answer : (B) Passwords to prohibit unauthorised access to files.

Description : In Unix operating system, special files are used to : (A) buffer data received in its input from where a process reads (B) provide a mechanism to map physical device to file names (C ... pointers associated with i-nodes (D) store information entered by a user application program or utility program

Last Answer : (B) provide a mechanism to map physical device to file names 

Description : Which of the following information about the UNIX file system is not correct? (A) Super block contains the number of i-nodes, the number of disk blocks, and the start of the list of free disk blocks. (B ... Each i-node is 256-bytes long. (D) All the files and directories are stored in data blocks. 

Last Answer : (C) Each i-node is 256-bytes long.

Description : You organize files by storing them in a) Archives b) Folders c) Indexes d) Lists

Last Answer : b) Folders

Description : You organize files by storing them in: a) Archives b) Folders c) Lists d) None of These

Last Answer : b) Folders

Description : You organise files by storing them in a) Archives b) Folders c) Indexes d) Lists e) None of these

Last Answer : b) Folders

Description : What are the operations that can be performed on Files?

Last Answer : Ans: Following operations can be performed on files1. Creation of a file of a specific type. 2. Reading/processing a file. 3. Append/add information to a file. 4. Modify/edit data in a file. 5. Delete items in a file. 6. Update the file.

Description : Which command is used to concatenate all files beginning with the string 'emp' and followed by a non-numeric characters? A. cat emp[!0-9] B. more [emp][!0-9] C. cat emp[x-z]

Last Answer : A. cat emp[!0-9]

Description : Which of the following files will displayed by this command cat *ch* A. patch B. catch C. .ch D. All of the above E. None of the above

Last Answer : D. All of the above

Description : Which command is used to change protection mode of files starting with the string emp and ending with 1,2, or 3? A. chmod u+x emp[l-3] B. chmod 777 emp* C. chmod u+r ??? emp D. chmod 222 emp? E. None of the above

Last Answer : A. chmod u+x emp[l-3]

Description : Which command is used to copy all files having the string chap and any two characters after that to the progs directory? A. cp chap?? progs B. cp chap* progs C. cp chap[12] /progs/*.*

Last Answer : A. cp chap?? progs

Description : Match the following. a) Java 1) is a tool for debugging java program b) Javah 2) is a tool for creating C-like header files c) Javap 3) runs java bytecode d) jdb 4) prints java code representation A) a-3, b-2,c-1 B) a-3, b-1, c-4, d-2 C) a-1, b-2, c-3, d-4 D) a-2, b-1, c-3, d-4

Last Answer : B) a-3, b-1, c-4, d-2

Description : Which of the following is true about Java. A) Java does not support overloading. B) Java has replaced the destructor function of C++ C) There are no header files in Java. D) All of the above.

Last Answer : D) All of the above

Description : Which of the following cannot be passed to a function? A) Reference variable B) Arrays C) Class objects D) Header files

Last Answer : D) Header files

Description : A ………………… attaches itself to executable files and replicates, when the infected program is executed, by finding other executable files to infect. A) Stealth virus B) Polymorphic Virus C) Parasitic Virus

Last Answer : C) Parasitic Virus

Description : Which of the following of the TCP/IP protocols is the used for transferring files from one machine to another? A) FTP C) SNMP B) SMTP D) Rpe

Last Answer : A) FTP

Description : Which of the following applications allows a user to access and change remote files without actual transfer? A) DNS B) FTP C) NFS D) Telnet

Last Answer : C) NFS

Description : Which of the following TCP/IP protocols is used for transferring files form one machine to another. A) FTP B) SNMP C) SMTP D) RPC

Last Answer : A) FTP

Description : Consider a project with the following functional units : Number of user inputs = 50 Number of user outputs = 40 Number of user enquiries = 35 Number of user files = 06 Number of external interfaces = 04 ... average, the function points for the project will be (A) 135 (B) 722 (C) 675 (D) 672

Last Answer : (D) 672

Description : The Unix command: $ vi file1 file2 (A) Edits file1 and stores the contents of file1 in file2 (B) Both files i.e. file1 and file2 can be edited using ex' command to travel between files (C) Both ... using the mv' command to move between the files (D) Edits file1 first, saves it and the edits file2

Last Answer : (B) Both files i.e. file1 and file2 can be edited using ‘ex’ command to travel between files

Description : Which of the following statement is not correct with reference to cron daemon in UNIX O.S? (A) The cron daemon is the standard tool for running commands on a predetermined schedule. (B) It starts ... command lines and the times at which they invoked. (D) Crontab for individual users are not stored.

Last Answer : (D) Crontab for individual users are not stored.

Description : Which of the following storage device can be used for storing large backup data? (a) Floppy disks (b) Hard disk (c) Magnetic tapes (d) None of these -Technology

Last Answer : "B) Hard Disk.

Description : For storing lengthy information in a field ………….. data type is used. -Technology

Last Answer : For storing lengthy information in a field Memodata type is used.

Description : XML is widely used for storing data. -Technology

Last Answer : True XML is used to describe data and storing data.

Description : Which computer memory is used for storing programs and data currently being processed by the CPU? A) Mass memory B) Internal memory C) Non-volatile memory D) PROM

Last Answer : Answer : B

Description : An online backing storage system capable of storing larger quantities of data is A) CPU B) Memory C) Mass storage D) Secondary storage

Last Answer : Answer : C

Description : _______ is a method of storing data bits using magnetic charges instead of the electrical charges used by DRAM. A. VRAM B. WRAM C. MRAM D. None of the above

Last Answer : C. MRAM Magneto resistive RAM

Description : Which computer memory is used for storing programs and data currently being processed by the CPU? a) Mass memory b) Internal memory c) Non-volatile memory d) PROM e) None of these

Last Answer : b) Internal memory

Description : Which statement best describes the Software as a Service cloud delivery model? A. A virtual machine provisioned and provided from the cloud which allows the customer to deploy custom ... and run the application on the customer's own computers and simplifying maintenance and support.

Last Answer : An application delivered to the client from the cloud which eliminates the need to install and run the application on the customer's own computers and simplifying maintenance and support.

Description : Which of the following is false? a) The more important the data, the greater the need for backing it up b) A backup is as useful as its associated restore strategy c) Storing the ... near to its original site is best strategy d) Automated backup and scheduling is preferred over manual operations

Last Answer : Storing the backup copy near to its original site is best strategy

Description : In HDFS, reliability of storing data was maintained by a) Block Operations b) Block Replication c) Block Storage d) All the above

Last Answer : Block Replication

Description : Which of the following is false? a) The more important the data, the greater the need for backing it up b) A backup is as useful as its associated restore strategy c) Storing the ... near to its original site is best strategy d) Automated backup and scheduling is preferred over manual operations

Last Answer : Storing the backup copy near to its original site is best strategy

Description : Which computer memory is used for storing programs and data currently being processed by the CPU? a. Mass memory b. Internal memory c. Non-volatile memory d. PROM

Last Answer : b. Internal memory

Description : . An online backing storage system capable of storing larger quantities of data is a. CPU b. Memory c. Mass storage d. Secondary storage

Last Answer : c. Mass storage

Description : Which computer memory is used for storing programs and data currently being processed by the CPU? a. Mass memory b. Internal memory c. Non-volatile memory d. PROM

Last Answer : b. Internal memory

Description : An online backing storage system capable of storing larger quantities of data is a. CPU b. Memory c. Mass storage d. Secondary storage

Last Answer : c. Mass storage

Description : An online backing storage system capable of storing larger quantities of data is a. CPU b. Memory c. Mass storage d. Secondary storage

Last Answer : c. Mass storage

Description : Mention other ways in which java handles exceptions.

Last Answer : A: Java can handle exception using the try-catch block, throws keyword and throw keyword.

Description : In how many ways can 15 indistinguishable fish be placed into 5 different ponds, so that each pond contains at least one fish ? (A) 1001 (B) 3876 (C) 775 (D) 200

Last Answer : (A) 1001

Description : In how many ways can the string A ∩ B - A ∩ B - A be fully parenthesized to yield an infix expression? (A) 15 (B) 14 (C) 13 (D) 12

Last Answer : (B) 14

Description : Name the primitive data-types in java.

Last Answer : A: byte, short, int, long, float, double, char and boolean