#include
#include
using namespace std;
int main()
{
FILE*f;
int n;
char k;
f=fopen("my_file.binary","wb");
cout << "n=";cin>>n;
for(int i=1; i<=n; i++)
{
cin>>k;
fwrite(&k,sizeof(k),1,f);
}
fclose(f);
cout<<"Fayl elementlari"<
f=fopen("my_file.binary","rb");
while(!feof(f))
{
fread(&k,sizeof(k),1,f);
if(!feof(f))
cout<
}
return 0;
}
Do'stlaringiz bilan baham: |