Store first n natural no in a file - c program, C/C++ Programming

Program is to store first n natural no in a file:

Write a program to store first n natural no in a file

void main()

    {

    fstream file;

    file.open("student.dat",ios::in|ios::out|ios::app);

    int n;

    cout<<" enter record to be modified ";

    cin>>n;

    file.seekg((n-1)*sizeof());

    file.read((char *)&  ,sizeif());

    file.write((char *)&  ,sizeof());

    file.close();

    }

Posted Date: 10/19/2012 5:37:09 AM | Location : United States







Related Discussions:- Store first n natural no in a file - c program, Assignment Help, Ask Question on Store first n natural no in a file - c program, Get Answer, Expert's Help, Store first n natural no in a file - c program Discussions

Write discussion on Store first n natural no in a file - c program
Your posts are moderated
Related Questions

Goal: Design a program that computes square matrix multiplication on GPU using CUDA. Write the code in C. In particular, your implementation should obey the following requiremen

How to define a derived class ? A singly inherited derived class id defined by writing : The keyword class. The name of the derived class . A single colon (:).

Implement the search property from catalogue menu option.  After selecting this option the user should be asked to specify the property using the following sub-menu: 1. Specif

how is it made

Write a simple telephone book program that stores the names and phone numbers of your friends/acquaintances in a file. Your program should have the abilities to: a. Add entries (n

Program of function overloading: class vector{                 private :                 int v[3];                   public:                 /*friend istream &

C Program for SORTING OF LONG WORD WITH DIFFERENT STRING #include stdio.h> #include conio.h> #include string.h>   void main() {           char n[50],c[25][25]

Define Pure Virtual Function? Why & when it is used?

padovan string for a natural number is defined