Question

In: Computer Science

What is true about Random Access Files? Check all that apply. 1. The program can read...

What is true about Random Access Files? Check all that apply.

1. The program can read file data anywhere the read location is positioned.

2. Data must be sorted to to use random access functions.

3. Data can be read in any order specified in the program.

4. seekp and seekg can be used to access files by a given position.

Solutions

Expert Solution

All the options except 2 are true.

i.e Option 1,3,4 are true about Random Access Files.

Explanation:

  • Option 1 : In random access files we can access files randomly from anywhere using the memory address of that file. So, this option is absolutely true.
  • Option 2 : There is no need of data to be sorted. Because in random access we are accessing files with their addresses like an array so no need of data to be sorted.
  • Option 3 :  As we are accessing data using memory addesses of the file so we can traverse the data in any format we want.
  • Option 4 : seekp is used to put the pointer to the specified memory address, and seekg is also used to put the pointer at the specified memory address but the difference it that seekp is used for output operation but seekg is used for input operaion. So, both are using to access files by a given position either for input or for output operation.

So, this was the solutions of the problem.

I hope I am able to solve your problem, if yes then do give it a like.

It really helps :)


Related Solutions

Which of the following are true about all normal distributions? Check all that apply A. They...
Which of the following are true about all normal distributions? Check all that apply A. They are symmetric. B. They are all centered at zero. C. They have one large tail. D. They are categorically sharp. I chose A and D but I still get errors . I dont know if my answer wrong or I have to add one more
1. Which of the following statements are true about short selling? Check all that apply: The...
1. Which of the following statements are true about short selling? Check all that apply: The investor involved in short selling anticipates that the share price will fall. Short selling is the sale of a security that is not owned by the seller. The investor involved in short selling anticipates that the share price will increase. Short selling means that an investor purchases securities using funds borrowed from her broker. Short sellers borrow securities and sell them immediately. 2. The...
Which of the following statements about a monopoly firm are true? (Check all that apply.) It...
Which of the following statements about a monopoly firm are true? (Check all that apply.) It faces a downward-sloping demand curve. Its long-run average total cost curve is always downward sloping. Its marginal revenue is always below the price. It is always profitable in the short run. It is the only seller of a good or service with no close substitutes available. It always experiences economies of scale.
The following is true about Alzheimer's Disease Check all that apply it is irreversible it accounts...
The following is true about Alzheimer's Disease Check all that apply it is irreversible it accounts for 2/3 of all dementia conditions it causes significant cognitive impairment it can be prevented Question 40 1 Point The Demographic Transition Theory attempts to explain the trends in population aging True False
Which of the following statements about the FCF valuation model are true? Check all that apply....
Which of the following statements about the FCF valuation model are true? Check all that apply. A. The model has limited applicability because it fails to adjust for a firm's riskiness—particularly that created by managers' decisions to use debt in the firm's capital structure, or decisions regarding the payment of cash dividends. B. The model is useful because it examines the relationship between a company's risk, operating profitability, and value of the firm's operations. C. A company's FCFs are a...
Which of the following statements about the FCF valuation model are true? Check all that apply....
Which of the following statements about the FCF valuation model are true? Check all that apply. A. The FCF valuation model reflects the firm's riskiness—as it affects the company's intrinsic value—via the WACC variable. B. A company's FCFs are a function of how effectively managers control the firm's costs, manage its operating and nonoperating assets, and generate sales revenues. C. The model is useful because it demonstrates the relationship between quality of the decisions that managers make and the value...
Which of the following is a true statement? (Check all that apply.)
Which of the following is a true statement? (Check all that apply.)A technological improvement isolated to one sector can indirectly result in more production in all other sectors.All points on the PPF are productively efficient.It is possible for a point to be allocatively efficient without being productively efficient.PPFs slope down for the same reason that the demand curve slopes down.
What is TRUE of using heat to kill organisms? Check all that apply all organisms will...
What is TRUE of using heat to kill organisms? Check all that apply all organisms will die by boiling water moist heat is more effective at higher pressures heat does not inactivate viruses dry heat is more effective at decontaminating items than moist heat
Which statements would also be true about the effects of fasciculin? Check all that apply. Group...
Which statements would also be true about the effects of fasciculin? Check all that apply. Group of answer choices It would cause more calcium to be released fron the sarcoplasmic reticulum It would increase the amount of ACh in the synapse It would decrease the amount of ACH in the synapse It would increase parasympathetic output It would increase sympathetic output It would decrease parasympathetic output It would decrease sympathetic output It would have influence on autonomic output
When using random access files in Java, the programmer is permitted to create files which can...
When using random access files in Java, the programmer is permitted to create files which can be read from and written to random locations. Assume that a file called "integers.dat" contains the following values: 25 8 700 284 63 12 50 Fill in blanks: You are required to write the following Java code statements: (a) create a new stream called, blueray, which allows the program to read from and write to the file, "integers.dat." _____________________ (b) Write a statement which...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT