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

C++ multiplayer game programming project, C++ Multiplayer Game Programming ...

C++ Multiplayer Game Programming Project Project Description: We are seeking an experienced C++ Game Programmer to enhance clientside related aspects of MCS: Mars City Securi

Flow chart, given number is prime or not

given number is prime or not

C program to print fibonacci series, C program to print fibonacci series: ...

C program to print fibonacci series: int fibo(long int); void main() {                 long int a=0,n;                 printf ("how many terms\n");

Explain processing a data file, Explain Processing A Data File? Mainly ...

Explain Processing A Data File? Mainly data file applications needs that a data file be altered as it is being processed. For instance in an application involving the processin

Console atm machine coding, construct a console programme for a bank ATM m...

construct a console programme for a bank ATM machine.

Compass bearing, write a c program that converts compass bearings into dire...

write a c program that converts compass bearings into direction

Last ant on rod, There are ''n'' ants on a ''n+1'' length rod. The ants are...

There are ''n'' ants on a ''n+1'' length rod. The ants are numbered from 1 to n and are initially placed at positions starting from position 1 till position n. They are moving eith

Write a program to illustrate array, Write a Program to illustrate Array? ...

Write a Program to illustrate Array? int x[100]; char text[80]; float temp[30]; static int marks[5]; We are able to use symbolic constants instead of expression. The valu

Programming, Write a program that writes your name on the monitor ten times...

Write a program that writes your name on the monitor ten times. Write this program three times, once with each looping method.

Application for build a toy program, With this assignment you will build a ...

With this assignment you will build a toy program that manipulates pointers to integers. You will develop the same main program fragment in both C and Assembler. Thus, you'll get t

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