C++

Objectives :

  • myIOS1.cpp
    std::cin>>ch1;
    std::cout.width(10);
     ch2=std::cout.fill('A');
     
  • ifstream -ios::app  => Opening file in append mode, placing the pointer at the end of the file.
  • ios::ate => sets pointer at the end of the file.
  • ios::in => File is being accessed for input.
  • ifstream ios::nocrreate => Would return an error when the spdified files does not exists.
  • ios::noreplace=> instruction for not replacing an existing file.
  • ios::out => file would be opened for output.
  • ios::trunc => overwrites the contents of a file.
 

Step: 1 Create a source file.

Step: 2 Edit and save Source file

Step: 3 Runtime Views:

if you leave a space, the out put will be different

Step: