Results (
English) 1:
[Copy]Copied!
Chapter 7PASCAL English ver.A. Multiple choice1. Definition of sequential file is. .. a group of the same type of record) that are accessed sequentially.b) a set of data that can be accessed randomlyc) a set of various types of data and can be accessed sequentiallyd) a set of various types of data and can be accessed at randome) all true2. Which operation that only can be used in file that has a type, that is ...a) Filesize, truncate, appendb) Filesize, assign, appendc) Seek, filesize, truncated) Append, seek, eolne) eoln, Eof, printf3. The following sequence of operations that use true, except ... a) Assign, read, closeb) Assign, write, closec) Reset, read, closed) Assign, seek, closee) Seek, assign, close-up4. assign the function of the is. ..a) for connecting/make the connection between physical files fromb) to create a new file and open the new filec) for reading the contents of a file designated by your cursor and copy the data to a variable listd) to write down a list of variables from the isis to file at the place designated by cursore) close the file after it is processed5. The function of close is. ..a) for connecting/make the connection between physical files fromb) to create a new file and open the new filec) for reading the contents of a file designated by your cursor and copy the data to a variable listd) to write down a list of variables from the isis to file at the place designated by cursore) close the file after it is processed6. The function of read is. .. a) for connecting/make the connection between physical files fromb) to create a new file and open the new filec) for reading the contents of a file designated by your cursor and copy the data to a variable listd) to write down a list of variables from the isis to file at the place designated by cursore) close the file after it is processedNote the programs below!The program below to question No. 7 – 10!Sequential programs;Uses crt;Type employee = record ( … ) 7: string; salary: longint; end;Var Archives: files of (...) 8; p: employees; I: integer; Begin Assign ((...) 9, ' URcobacoba.dat ');Rewrite (archive);For i: = 1 to n do begin Begin WriteLn (' input to employees-', i);Write (' Name '); readln (name p.);Write (' Salary: '); readln (...) 10;Write (archives, p); End;Close (archive);End.Complete text of the above algorithm section!7. a) archive b) namec) clerkd) salaries of p.e) array8. a) archive b) namec) clerkd) salaries of p.e) array9. a) archive b) namec) clerkd) salaries of p.e) array10. a) archive b) namec) clerkd) salaries of p.e) arrayB. Essay1. Explain what is meant by sequential file!Answer:A collection of recordings of the same type are accessed sequentially. Existing data in the program will be stored in the hard disk2. Please specify and describe the operations that are in sequential file!Answer:• Assign; to connect/make the connection between physical files from• Rewrite; to create a new file and open the new file• Reset; to move the cursor to the beginning of the file or open an existing file• Read; to read the contents of a file designated by your cursor and copy the data to a variable list• Write; to write the contents of the variable list to the file at the place designated by cursor• Close; to close the file after it is processed3. Please list and explain the operations that can only be used on sequential file type!Answer:• Seek; to determine/find data or records on file of type• Filesize; to know many records from the files available• Truncate; to delete a specific record4. State the advantages and disadvantages of sequential files!Answer:The advantage of the sequential file is able to store data that is already processed in the program. While the loss of sequential file is in need of a larger memory5. Grant programs below!Sequential programs;Uses crt;Type employee = record ( … ) 1: string; salary: longint; end;Var Archives: files of (...) 2; p: employees; I: integer; Begin Assign ((...) 3, ' URcobacoba.dat ');Rewrite (archive);For i: = 1 to n do begin Begin WriteLn (' input to employees-', i);Write (' Name '); readln (name p.);Write (' Salary: '); readln (...) 4;Write (archives, p); End;Close (archive);End.Answer:1. the name of the2. employees3. archive4. p. salaryC. Journal1. make a program with a file type of sequential!Sequential programs;Uses crt;Type = student record name, nim: string; end;Var Archives: files of students; m: students; I, n: integer; Begin Assign (archive, ' URmahasiswa.dat ');Rewrite (archive);Write (' enter a lot of students: '); readln (n)For i: = 1 to n do begin Begin WriteLn (' data Input into student-', i);Write (' Name '); readln (m. name);Write (' NIM: '); readln (URm.nim);Write (archives, m); End;Close (archive);End.
Being translated, please wait..
