Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5 Of the folowing, which is the best way to open a tio7 (Assume T is the fie's type and H is the -inputing, outputing,

image text in transcribed
5 Of the folowing, which is the best way to open a tio7 (Assume T is the fie's type and H is the -inputing, outputing, appending. etc.) B) T file; char fname [MAX] // read fname A) r filei char fname [MAX); // read fname file.open (fname): // use file here file open( fname, N): if (Ifile) exit(l); // use file here D) T file; C) T file: char fname [MAX]; // read fname file.open(fname, N) while (Ifile) char fname [MAX] // read fname file.open(fname, M): while (Ifile) // error message, // read fname again file.open(fname, M); file.closeO; file.clearO // error message. // read fname again file.open(fname, M); // use file here // use file here E) T file("name") // use file here 7) When several functions in a program are using the same file, the programmer should: needed in each A) send the file's name as a string argument to each function, opening and close-ing it as B) create a new file variable and name in each function-allowing the user to re-enter the name each time C) pass the file variable to each function, but still open and close it within each function; using one of t he above two options to get the file's name D) open the file variable, passing it to each function to use (clearing and seeking as needed), close it when all are done E) just forget the whole thing: files are just too hard to program with! TRUE/FALSE The guaranteed invalid memory address is, according to the standard, TRUE/FALSE The constant NULL (meant to symbolically represent this address) is [supposed to be and should therefore be] compatible with pointers of all base types. he function returns true when the end of the file has been reached. The function returns rue if a translation or other logical error has occurred on a stream. The function returns true when mething has happened to the physical medium of a disk file. A) fail, bad, eof 3) eof, bad, fail ) fail, eof, bad ) eof, fail, bad ) bad, eof, fail om overloaded operators for de-allocating arrays from the heap, accessing a member of an object to rns the value of its right-hand operand unchanged. which you have a pointer, and which normally

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions

Question

5. Explain the supervisors role in safety.

Answered: 1 week ago

Question

Explain the various methods of job evaluation

Answered: 1 week ago

Question

Differentiate Personnel Management and Human Resource Management

Answered: 1 week ago

Question

Describe the functions of Human resource management

Answered: 1 week ago