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

Assignment Help:

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();

    }


Related Discussions:- Store first n natural no in a file - c program

The use of the break and continue statements in a loop, Question: (a) ...

Question: (a) A bank has four types of accounts with annual interest rates as follows: Savings 8% Savings with Cheque Book 5% Current 4% Fixed deposits 10% Using

Build a standalone module to extract and parse, A skilled programmer is req...

A skilled programmer is required to build a standalone module to extract, parse and store in database tables, word count data from web pages and RSS feeds. The module will take

Program that implements a digital clock, Write C code for a program that im...

Write C code for a program that implements a digital clock (HH:MM:SS). The clock includes a two-digit hour indicator HH (00-23), a two-digit minute indicator MM (00-59), and a t

C programming, write a c program to solve exanple of lamis therom

write a c program to solve exanple of lamis therom

Constructor, Why copy constructor accepts reference to an object and not t...

Why copy constructor accepts reference to an object and not the object itself, whether ah hence it we do otherwise

Write a program to illustrate array of structures, Write a program to illus...

Write a program to illustrate array of structures? struct customer { int id; char name[15]; }; struct customer c[100]; . In the above instance, the array of Structures is

Define procedure to input integers and returns the average, The procedure +...

The procedure +, * and list take arbitrary numbers of arguments. One way to define such a procedure is to use define with dotted-tail notation. In a procedure definition, a paramet

Check whether the string entered is a palindrome or not, Program is to chec...

Program is to check whether the string entered is a palindrome or not: Program is to check whether the string entered is a palindrome or not invoke function from main int p

Asdas, Ask question #Miniasdasmum 100 words accepted#

Ask question #Miniasdasmum 100 words accepted#

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd