C++ Program to Write and Read of User Input File

C++ Program to Write and Reading of User Input File
- Write a C++ Program to Create a File
- Write a C++ Program to Read a File
- C++ Program & Algorithm Convert Celsius to Fahrenheit
- C++ Program to Check Entered String is Palindrome or Not
- C++ Program to Check Whether the Entered Number is Palindrome or Not
Source Code
#include<iostream>
#include<fstream>
#include<conio.h>
using namespace std;
int main()
{
char buffer[100],name[10], address[10];
int maxlength=100;
ofstream outf(“test.txt”);
{
cout<<“\nEnter the name : “;
cin>>name;
outf<<name<<endl;
cout<<“\nEnter the address : “;
cin>>address;
outf<<address<<endl;
}
outf.close();
ifstream fin(“test.txt”);
{
fin>>name>>address;
cout<<“\nThe name is : “<<name<<endl;
cout<<“\nThe address is : “<<address<<endl;
}
fin.close();
getch();
}