initial checkin from subversion
This commit is contained in:
30
data1.c
Normal file
30
data1.c
Normal file
@@ -0,0 +1,30 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main ()
|
||||
{
|
||||
FILE * fp;
|
||||
struct dst
|
||||
{
|
||||
char name[30];
|
||||
char vorname[30];
|
||||
char telnr[20];
|
||||
struct dst *ptr;
|
||||
};
|
||||
struct dst dat;
|
||||
printf("\n name:");
|
||||
scanf("%s", dat.name);
|
||||
printf("\n vormane:");
|
||||
scanf("%s", dat.vorname);
|
||||
printf("\n tel.:");
|
||||
scanf("%s", dat.telnr);
|
||||
|
||||
fp = fopen ("test.datei","ab");
|
||||
if (fp == NULL)
|
||||
{
|
||||
fprintf(stderr,"\n Kei Öffnen\n");
|
||||
exit(3);
|
||||
}
|
||||
fwrite(&dat, sizeof(dat),1,fp);
|
||||
return(fclose(fp));
|
||||
}
|
||||
Reference in New Issue
Block a user