Starting out with Visual C# (4th Edition)
4th Edition
ISBN: 9780134382609
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 5, Problem 8MC
Program Description Answer
Files on a disk are identified by a “filename”.
Hence, the correct answer is option “B”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Which of the following is the slowest in accessing data?A. zip diskB. hard diskC. floppy diskD. magnetic disk
Which of the following operations should only be allowed to be done when the CPU is in kernel mode?
Group of answer choices
1) Read data from a file
2) Open a file for reading, writing, or both
3) Set the time-of-day clock
4) Read the time-of-day clock
A programmer opened a file using the file descriptor fd. The file contains the following sequence of bytes:
12, 14, 33, 33, 33, 12, 14, 1, 6, 33, 12, 14, 1, 6, 12
The programmer then uses these two system calls:
lseek(fd, 3, SEEK_SET);
read(fd, &buffer, 4);
note, the lseek call makes a seek to byte 3 of the file. What does buffer contain after the read system call completes?
Group of answer choices
1) 33 33 33 12
2) 33 33 12 14
3) 33 12 14 1
4) 33 12 14
In a uniprocessor system, multiprogramming increases processor efficiency by:
Group of answer choices
1) All of the above
2) Increasing processor speed
3) Eliminating all idle processor cycles
4) Taking advantage of time wasted by long wait…
18.4 From a Windows command line prompt, do a dir command. Carefully note how much space remains on your disk. Now open up NOTEPAD, and create a new file containing just a period with a carriage return. Call this file PROB184.TXT and return to the prompt. Do a DIR PROB184.TXT command. How much space does your new file take up? How much space remains on your disk? Explain what happened.
Chapter 5 Solutions
Starting out with Visual C# (4th Edition)
Ch. 5.1 - Prob. 5.1CPCh. 5.1 - Prob. 5.2CPCh. 5.1 - Prob. 5.3CPCh. 5.2 - What is a loop iteration?Ch. 5.2 - What is a counter variable?Ch. 5.2 - What is a pretest loop?Ch. 5.2 - Does the while loop rest its condition before or...Ch. 5.2 - What is an infinite loop?Ch. 5.3 - What messages will the following code sample...Ch. 5.3 - How many rimes will the following loop iterate?...
Ch. 5.4 - Name the three expressions that appear inside the...Ch. 5.4 - You want to write a for loop that displays I love...Ch. 5.4 - What would the following code display? for (int...Ch. 5.4 - What would the following code display? for (int...Ch. 5.5 - What is a posttest loop?Ch. 5.5 - What is the difference between the while loop and...Ch. 5.5 - How many times will the following loop iterate?...Ch. 5.6 - What is an output file?Ch. 5.6 - What is an input file?Ch. 5.6 - What three steps must be taken by a program when...Ch. 5.6 - What is the difference between a text file and a...Ch. 5.6 - Prob. 5.22CPCh. 5.6 - What type of object do you create if you want to...Ch. 5.6 - What type of object do you create if you want to...Ch. 5.6 - If you call the File.CreateText method and the...Ch. 5.6 - If you call the File.AppendText method and the...Ch. 5.6 - What is the difference between the WriteLine and...Ch. 5.6 - What method do you call to open a text file to...Ch. 5.6 - What is a files read position? Initially, where is...Ch. 5.6 - How do you read a line of text from a text file?Ch. 5.6 - How do you close a file?Ch. 5.6 - Assume inputFile references a StreamReader object...Ch. 5.7 - What is the benefit of using an Open and/or Save...Ch. 5.7 - Prob. 5.34CPCh. 5.8 - What does a Random objects Next method return?Ch. 5.8 - What does a Random objects NextDouble method...Ch. 5.8 - Write code that creates a Random object and then...Ch. 5.8 - Write code that creates a Random object and then...Ch. 5.8 - Prob. 5.39CPCh. 5.8 - What happens if the same seed value is used each...Ch. 5.9 - Prob. 5.41CPCh. 5.9 - Prob. 5.42CPCh. 5 - ListBox controls have an __________ method that...Ch. 5 - A __________ is commonly used to control the...Ch. 5 - A(n) __________ loop tests its condition before...Ch. 5 - The term __________ is used to describe a file...Ch. 5 - The term __________ file is used to describe a...Ch. 5 - A __________ file contains data that has been...Ch. 5 - When you work with a __________ file you access...Ch. 5 - Prob. 8MCCh. 5 - A __________ object is an object that is...Ch. 5 - When a program works with an input file, a special...Ch. 5 - When the user selects a file with the Open dialog...Ch. 5 - The __________ control displays a standard Windows...Ch. 5 - Once you have created a Random object, you can...Ch. 5 - Prob. 14MCCh. 5 - When you run an application, the applications form...Ch. 5 - If the ListBox is empty, the Items.Count property...Ch. 5 - To increment a variable means to increase its...Ch. 5 - When a variable is declared in the initialization...Ch. 5 - The while loop always performs at least one...Ch. 5 - The term read file is used to describe a file that...Ch. 5 - To append data to an existing file, you open it...Ch. 5 - As items are read from the file, the read position...Ch. 5 - The numbers that are generated by the Random class...Ch. 5 - Prob. 10TFCh. 5 - What is contained in the body of a loop?Ch. 5 - Write a programming statement that uses postfix...Ch. 5 - How many iterations will occur if the test...Ch. 5 - What are filename extensions? What do they...Ch. 5 - When an input file is opened, what is its read...Ch. 5 - How can you read all of the items in a file...Ch. 5 - What is a variable that is used to accumulate a...Ch. 5 - By default, the Open dialog box displays the...Ch. 5 - Prob. 9SACh. 5 - Prob. 10SACh. 5 - Write a loop that displays your name 10 times.Ch. 5 - Write a loop that displays all the odd numbers...Ch. 5 - Write a loop that displays every fifth number from...Ch. 5 - Write a code sample that uses a loop to write the...Ch. 5 - Assume that a file named People.txt contains a...Ch. 5 - Distance Calculator If you know a vehicles speed...Ch. 5 - Distance File Modify the Distance Calculator...Ch. 5 - Celsius to Fahrenheit Table Assuming that C is a...Ch. 5 - Prob. 4PPCh. 5 - Pennies for Pay Susan is hired for a job, and her...Ch. 5 - Prob. 6PPCh. 5 - Prob. 7PPCh. 5 - Prob. 8PPCh. 5 - Prob. 9PPCh. 5 - Addition Tutor Create an application that...Ch. 5 - Random Number Guessing Game Create an application...Ch. 5 - Calculating the Factorial of a Number In...Ch. 5 - Random Number File Writer Create an application...Ch. 5 - Random Number File Reader This exercise assumes...
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Python Question: Which statement correctly opens an existing file if you want to add lines to it? A. open('data.txt', 'a') B. f = open('data.txt', 'append') C. f = open('data.txt', 'a') D. data = open('data.txt', 'w')arrow_forwardWhat is a computer file? What does it mean by file format? What is the file extension used for? Given the following files, what each file extension means? a) Game1.exe b) Accounting.hlp c) Resume.doc d) Mypage.htmlarrow_forwardDont use answers from other websites please! MIPS source programs and the screenshots of your MARS execution windows. Name: .asciiz "James Bond!"Age: .byte 24Numbers: .word 11, 22, 33Letter1: .asciiz 'M' 2. Create the data declaration part of the above by creating a file with MARS and assemble it to show the memory contents. You don't have to have .text part since this is just data declaration only. Capture your screen of MARS execution window by checking "ASCII" option of Data Segment part.arrow_forward
- Please choose the answer and give the reasoning for it. Given the following statement, which statement will write "Calvin" to the file DiskFile.txt? PrintWriter diskOut = new PrintWriter("DiskFile.txt"); 1. System.out.println(diskOut, "Calvin"); 2. DiskFile.println("Calvin"); 3. PrintWriter.println("Calvin"); 4. diskOut.println("Calvin");arrow_forwardPython script that uses the os module 1. Display the current working directory. 2. Create a new directory called "test_dir" in the current working directory. 3. Change the current working directory to "test_dir". 4. Verify the current working directory has been changed. 5. Create a new file named "test_file.txt" in "test_dir". a. You must write the following contents to test_file.txt: This is a test file. 6. Verify that "test_file.txt" was created by listing the contents of "test_dir". 7. Display the file size and the last modification time of "test_file.txt". 8. Change the name of "test_file.txt" to "new_test_file.txt". 9. Verify the name change by listing the contents of "test_dir" again. 10. Finally, remove "new_test_file.txt" and "test_dir", verifying each deletion by listing the contents of the parent directory.arrow_forwardClojure program question I divided one file into three files Since then, an error has occurred and I want to know how to fix it for example, I have a.clj then I divide a.clj, b.clj, c.clj How to connect those three files? using namespace? explain indetail pleasearrow_forward
- Assume the following files are in the working directory: $ ls output.txt notes1 notes2 notestxt notes3 notes4 output.1 output.2 output.3 output-1b output-2b Give commands for each of the following, using wildcards to express filenames with as few characters as possible. a. List all files that begin with output. b. List all files that end in txt. c. List the output. files only. d. List the output.1, output.3, notes1, and notes3 files.arrow_forwardTo print a file before exiting the vi editor is possible. Which of the following commands provide the printing function of the vi editor? Choose an answer A) yy B) wq C) p D) lprarrow_forwardAfter formatting a filesystem on a hard drive, it must be used by all partitions on that hard drive. Is this a true or false statement?arrow_forward
- How do I complete using VirtualBox (OS System) Ubuntu 64? Create a new group named superusers, and include your_name_admin1 and your_name_admin2 users into the superusers group. Create a directory in the your_name_admin1's ${HOME} named justforyour_nu_name and setup the permissions required to make it accessible (RWX) by any user of the superusers group, but only read (R) permissions for the user your_name_regular Provide a screenshot-2 that shows permissions configuration in folder justforyour_name_. Become user your_name_admin1 in your system and create a simple text-file named your_name_file into the justforyour_name folder. That file should be a text file with the following content:CY5001 Spring 2022"your email address""your full name" For example: CY5001 Spring 2022smith.mMary Smitharrow_forwardBook reference: Windows PowerShell Step by Step 3rd Edition - Ed WilsonSubj: PWS0 - PowerShell Chapter 3 13. What does this command do?gci | where {!($psitem.psiscontainer)} 14. What is the "::" punctuation sign used for? 15. What do the below commands do?New-Item -Name mytempfile2 -ItemType File -Value "My file"Add-Content mytempfile2 -Value "HELLO WORLD"16. Elaborate what each of the below commands does:PS C:\> Push-Location PS C:\> Set-Location HKCU:\Software\test PS HKCU:\Software\test> Set-ItemProperty . newproperty "mynewvalue" PS HKCU:\Software\test> Pop-Location PS C:\>arrow_forwardSeveral questions regarding the commands and shell programming a) list all files that the name starts/contains with ‘exam’. b) how to get the line count of a file? c) read/write files d) append directory the PATH environment variablearrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,A+ Guide To It Technical SupportComputer ScienceISBN:9780357108291Author:ANDREWS, Jean.Publisher:Cengage,
- LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.Computer ScienceISBN:9781337569798Author:ECKERTPublisher:CENGAGE LCompTIA Linux+ Guide to Linux Certification (Mind...Computer ScienceISBN:9781305107168Author:Jason EckertPublisher:Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
A+ Guide To It Technical Support
Computer Science
ISBN:9780357108291
Author:ANDREWS, Jean.
Publisher:Cengage,
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:9781337569798
Author:ECKERT
Publisher:CENGAGE L
CompTIA Linux+ Guide to Linux Certification (Mind...
Computer Science
ISBN:9781305107168
Author:Jason Eckert
Publisher:Cengage Learning