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

Create a program that converts numbers to characters, People sometimes give...

People sometimes give their phone numbers using one or more alphabetic characters. Create a program that converts the alphabetic characters to their corresponding numbers. For exam

C program for function of merge , C Program for FUNCTION OF MERGE #inc...

C Program for FUNCTION OF MERGE #include conio.h> #include stdio.h> char cot(char a[],char b[]); void main() {           char a[50],b[50];           clrscr()

Create a mathematical number guessing game, Create a mathematical number gu...

Create a mathematical number guessing game. Have the user prompt for the number of games that they want to play. Then each game consists of the following rules. a. The computer

Explain some string oriented library functions, Explain some String Oriente...

Explain some String Oriented Library Functions? To make simpler string processing we can use special string oriented library functions. Mainly the C compilers include library f

COMPILER DESIGN, aj is a newbie to the programming and while learning the p...

aj is a newbie to the programming and while learning the programming language he came to know the following rules: - Each program must start with ''{'' and end with ''}''.

When i throw this object, A: Depends. Might be "zero" Objects which are ...

A: Depends. Might be "zero" Objects which are thrown must have a publicly accessible copy-constructor. The compiler is permitted to generate code which copies the thrown object

Develop a windows application to show computer hardware, - But with less fe...

- But with less features and more user-friendly (particularly for non-tech savvy users). - Software needed having a left menu with links (no pictures required) for every hardwar

Coding, I want MODI method''s coding in c++ using all concepts of c++..plea...

I want MODI method''s coding in c++ using all concepts of c++..please help me its my project work...

MCQ, in a multilist organisation

in a multilist organisation

Program that implements inference given a bayesian network, In this problem...

In this problem, you will write a program that implements two algorithms for performing exact inference given a Bayesian network, namely, enumeration and variable elimination. Your

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