GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  C++
Go To First  |  Previous Question  |  Next Question 
 C++  |  Question 193 of 203    Print  
C++ File Stream
What is the concept of file stream in C++? How is a file opened and closed in C++?


  
Total Answers and Comments: 1 Last Update: July 17, 2009     Asked by: ayaan_deep 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 17, 2009 00:22:53   #1  
Peter_APIIT Member Since: April 2008   Contribution: 2    

RE: C++ File Stream
File stream are opened when default constructor was called and closed during destructor called.
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    

 Related Questions

Latest Answer : If you can load the binary file using some kind of debugging tools which also display the binary code in ASCII characters for the code segment, you may see the corresponding C++ source code which displayed in ASCII characters.  ...
Read Answers (4) | Asked by : suji

How is static variable stored in the memory?( if there are 2 functions in a file,and the static variable name is same (ex var) in both the function. how is it keep seperately in the memory).

Latest Answer : Object file is the representation of code that a compiler generates by processing a source code file. Object files contain compact code, often called "binaries". A linker is used to generate an executable or library by linking object files together. An ...
Read Answers (3) | Asked by : Subash

I want C++ code forCreate method inside Principal mentor class called assignAssociates to assign associate mentors from faculty.txt to a course. Create a file named associates.txt store CourseId,FacultyId,Role. Overload assignAssociates function with arguments. Overloading Method1 with three arguments courseId,FacultyId,Role. Overloading Method2 with two arguments courseId,FacultyId. ( Section 6.17 from chapter 6. ) Overload methods compactly and conveniently by using function templates. Create

Suppose there is a txt file with following format:Student name Grades in subjectsX ABA+CDA+Y B+CAA+AAthere can be many students with there grades in various subjects. (number of subjects are unknown)Possible values of grade are: A, A+, B, B+, C, D now suppose the file gets corrupted and all '+' are replaced by 'A'Write a program to restore the file
Tags : Restore

Hi,Iam very much new to programming and C++please help meI have an application that uses socket++ classes on Unix (AIX) environmentI have included #include in two of my .cpp filesand I have socket++ source 
Latest Answer : hi,Does the environment variable PATH contain the path of the folder in which the header files are present??If not, then either modify the PATH variable, or use -I option to specify the location of header files.eg. cc -I$HEADER_FILES_PATH -o myProgram ...
Read Answers (1) | Asked by : vvadan

How will you write object into file using file concepts in C++? 
Latest Answer : A function in the class definition can be included which writes to the standard file stream and takes the name of target file as a parameter. Function prototype will be like this:WriteObjectToFile (const char* fileName){ofstream fout(fileName);fout

What is the concept of file stream in C++? How is a file opened and closed in C++? 
Latest Answer : File stream are opened when default constructor was called and closed during destructor called. ...


 Sponsored Links

 
Related Articles

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

C++ Standard Input Output Stream

C Standard Input Output Stream In this C tutorial you will learn about standard input stream and standard output stream explained along with syntax and examples C programming language uses the concept of streams to perform input and output operations using the keyboard and to display information on
 

What is Data File

In a logical data model, the conceptual data model which is based on the business semantic is being defined. Thus, entities and relationships and corresponding table and column design, object oriented classes, and XML tags, among other things are being laid regardless of the database will be physica
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 

Programming Languages Certification

IT Certification programs have several options that will offer you the best knowledge.  By learning everything that you need to know about information technology you will be able to open new doors to your career and personal business desires.  IT Certification offers several vari
 

Neuro-linguistic Programming Methods

Neuro linguistic Programming Methods There are several methods used for performing Neuro linguistic Programming on an individual for obtaining insights into the psyche of the person in order to correct to modify certain patterns of behavior These techniques are also used for Neuro linguistic trainin
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape