rendered paste body#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<windows.h>
#include<time.h>
#include<conio.h>
typedef struct
{
char nom[40];
char marque[40];
char modele[40];
char type[40];
char moteur[40];
char carburant[40];
float consoville;
float consoautoroute;
}automobiliste;
int main()
{
automobiliste p;
FILE *f;
if ((f = fopen("C:\\automo.$$$", "wb"))==NULL)
{
printf("Cannot open file \n");
}
else
automobiliste p;
printf("Nom automobiliste :");
scanf("%s",&p.nom);
printf("la Marque du véhicule :");
scanf("%s",&p.marque);
printf("Modéle du véhicule :");
scanf("%s",&p.modele);
printf("type :");
scanf("%s",&p.type);
printf("type Moteur :");
scanf("%s",&p.moteur);
printf("type du carburant :");
scanf("%s",&p.carburant);
printf("Consommation en ville ( nombre de litres / 100km ):");
scanf("%f",&p.consoville);
printf("Consommation sur autoroute (nombre de litres / 100km):");
scanf("%f",&p.consoautoroute);
fwrite(&p,sizeof(automobiliste),1,f);
}