C program to read the contents of a file, C/C++ Programming

Program is to read the contents of a file:

void main()

   {

  ifstream fin("ascii.txt");

  char ch;

  while(! fin.eof())

    {

  fin>>ch;

  cout<

    }

  fin.close();

  }

 

 

Posted Date: 10/19/2012 5:38:22 AM | Location : United States







Related Discussions:- C program to read the contents of a file, Assignment Help, Ask Question on C program to read the contents of a file, Get Answer, Expert's Help, C program to read the contents of a file Discussions

Write discussion on C program to read the contents of a file
Your posts are moderated
Related Questions

Automatic Variables Automatic variables are variable which are explained within the functions. They lose their value when the function terminates. It can be accessed only in th

I need website Product section search box coding section fix Project Description: On our products section in the search box it only searches the name and title of our product

Functions Overloading This a capability in which a C++ program can have several functions performing similar tasks on different data types. When an overloaded function is calle

Using a Friend Using a friend function is quite easy. The following example explains a friend function to access members of two classes. class Bclass;

Can you think of a condition where your program would crash without attaining the breakpoint that you set at the starting of main()? A: C++ let for dynamic initialization of glo

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b

Program is to create a file student.dat: Program is to create a file student.dat which contains all name, roll_no,marks(5 sub) and percentage   class student    {

A more advanced data type is the structure; here we can define a template as a collection of different variables e.g.     struct birthdate   {     int month;     int day;

Program to convert fraction to decimal: int main() {                 float num, denom;     // numerator and denominator of fraction                 float value;