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 : Define Applet Applet : The Applets are

    Applet: The Applets are Java programs based on the Applet or JApplet classes. They are closely related with the capability to give active content within the Web pages. They have numerous features that differentiate them from ordinary Java graphical ap

  • Q : Examples in Threading in Java I need

    I need urgent help in Examples of Threading in Java

  • Q : What is Complement operator Complement

    Complement operator: The complement operator, ~, is employed to invert the value of each bit in the binary pattern. For illustration, the complement of 1010010 is 0101101.

  • Q : What do you mean by java Swing What do

    What do you mean by the term java Swing? Describe in brief.

  • Q : Differentiate between MFC and Win32

    Differentiate between MFC and Win32?

  • Q : Define Hardware Hardware : It is the

    Hardware: It is the physical devices of a computer system, like its micro-chips, keyboard, disk drives, printer, sound card, and so forth. It is termed `hardware' in contrary to programs, which are termed `software'.

  • Q : What is Reduce Concurrency Reduce

    Reduce Concurrency: From a model-checking perspective, the searched state space consists of all possible thread-state combinations, which implies that the level of concurrency has the biggest impact on state space size. As a consequence, reducing conc

  • Q : Define Context Normal 0 false false

    Normal 0 false false

  • Q : Explain functionality or an API needs

    The application I am creating needs having access to functionality or an API that use needs the Nokia Vendor ID. For my application how can I have this Nokia VID?

  • Q : Explain Branch instruction Branch

    Branch instruction: It stores a new instruction address into the program counter. The consequence of this is the next instruction to be fetched will not generally be the one instantly following the branch instruction. Therefore the normal chronologica

©TutorsGlobe All rights reserved 2022-2023.