File handling modes and corresponding flags

Q. Describe file handling modes and corresponding flags with examples in C++.

Ans. File handling modes specifiers the purpose for which the file is opened. The file mode parameters can take one (or more) of such constants defined in the class ios. Lists the file parameters and their meanings. Opening a file ios : : out mode also opens it is the ios : : trunk mode by default. Both ios : : app and ios : : ate us to the end of the file when it is opened. The distinction between the two parameters is that the ios : : app mode permits us to add data or to modify the existing data anywhere in the file. In both the cases, a file is created by the specifier name, if it does not exist. The parameter can be used only with the file capable of output. The mode can combine two or more parameters using the bitwise OR operator (symbol ||).





   Related Questions in Programming Languages

  • Q : State the term Win32 State the term

    State the term Win32. Answer: Win32 considers to Microsoft 32 bit Windows API. Applications of Win32 are programs that are built along with the Win32 API.

  • Q : Reducing state space of code What is

    What is the way to reduce the state space of the code during model checking?

  • Q : What is Runtime stack Runtime stack :

    Runtime stack: It is a stack structure maintained by the Java Virtual Machine which records that methods are presently being executed. The most of late entered technique will be at the top of the stack and the main technique of an application will be

  • Q : What is an IP address IP address : An

    IP address: An Internet Protocol (abbreviated as IP) address for a networked computer. Presently, IP addresses comprises of 4-byte values, written in dotted decimal notation, like In future, IP addresses will be 16-bytes long to accommodat

  • Q : Technologies are used in AJAX Name the

    Name the technologies that are used in AJAX?

  • Q : Define the term Key value Define the

    Define the term Key value: The object employed to produce an associated hash code for look-up in an associative data structure.

  • Q : Program to controls a quiz show in C++

    Foundations of Computer Science In this project, we will write a program that controls a quiz show, much like the many popular TV shows. The program will read in a group of questions and thei

  • Q : Virtual memory used in Windows

    Explain why the virtual memory is to be used in Windows architecture?

  • Q : Write a recursive function intpower(base

    Write a recursive function intpower(base, exponent) that when invoked returns base^exponent. For example, intpower(3,4) = 3*3*3*3. Assume that the exponent is an integer greater than or equal to 1.

  • Q : Explain the differences among SEI

    What in your advice are the most important fundamental differences among SEI SW-CMM and ISO 9000-3?

©TutorsGlobe All rights reserved 2022-2023.