#include <fstream> 
#include <iostream>
#include <string>

using namespace std;
main()
{
    char ch = 'x';
    int j = 77;
    double d = 6.02;
    string str1 = "Hello"; 
    string str2 = "world xyz"; 
    ofstream outfile("fdata.txt"); 
    outfile << ch 
            << j
            << ' '
            << d
            << str1
            << ' '
            << str2;
    cout << "File written\n";
    system("pause");
}
