4 -10 bytes: use command line arg
source | link

C (GCC), 10898 bytes

Store (5646 bytes)

Input is via first command line argument.

main(c,*f;s(v)char**v;{forfputs(f=fopenv[1],fopen("a","w");read(0,&c,1);)fputc(c,f);}

Retrieve (52 bytes)

c,d;r(){for(d=open("a",0);read(d,&c,1);)putchar(c);}

Unportability

  • Requires that several pointer types fit in int.

Acknowledgments

C (GCC), 108 bytes

Store (56 bytes)

c,*f;s(){for(f=fopen("a","w");read(0,&c,1);)fputc(c,f);}

Retrieve (52 bytes)

c,d;r(){for(d=open("a",0);read(d,&c,1);)putchar(c);}

Unportability

  • Requires that several pointer types fit in int.

Acknowledgments

C (GCC), 98 bytes

Store (46 bytes)

Input is via first command line argument.

main(c,v)char**v;{fputs(v[1],fopen("a","w"));}

Retrieve (52 bytes)

c,d;r(){for(d=open("a",0);read(d,&c,1);)putchar(c);}

Unportability

  • Requires that several pointer types fit in int.

Acknowledgments

3 added 75 characters in body
source | link

C (GCC), 108 bytes

Store (56 bytes)

c,*f;s(){for(f=fopen("a","w");read(0,&c,1);)fputc(c,f);}

Retrieve (52 bytes)

c,d;r(){for(d=open("a",0);read(d,&c,1);)putchar(c);}

Unportability

  • Requires that several pointer types fit in int.

Acknowledgments

C (GCC), 108 bytes

Store (56 bytes)

c,*f;s(){for(f=fopen("a","w");read(0,&c,1);)fputc(c,f);}

Retrieve (52 bytes)

c,d;r(){for(d=open("a",0);read(d,&c,1);)putchar(c);}

Acknowledgments

C (GCC), 108 bytes

Store (56 bytes)

c,*f;s(){for(f=fopen("a","w");read(0,&c,1);)fputc(c,f);}

Retrieve (52 bytes)

c,d;r(){for(d=open("a",0);read(d,&c,1);)putchar(c);}

Unportability

  • Requires that several pointer types fit in int.

Acknowledgments

2 -2 bytes: global typeless file pointer
source | link

C (GCC), 110108 bytes

Store (5856 bytes)

c;sc,*f;s(){int*f=fopenfor(f=fopen("a","w");while(read;read(0,&c,1);)fputc(c,f);}

Retrieve (52 bytes)

c,d;r(){for(d=open("a",0);read(d,&c,1);)putchar(c);}

Acknowledgments

C (GCC), 110 bytes

Store (58 bytes)

c;s(){int*f=fopen("a","w");while(read(0,&c,1))fputc(c,f);}

Retrieve (52 bytes)

c,d;r(){for(d=open("a",0);read(d,&c,1);)putchar(c);}

C (GCC), 108 bytes

Store (56 bytes)

c,*f;s(){for(f=fopen("a","w");read(0,&c,1);)fputc(c,f);}

Retrieve (52 bytes)

c,d;r(){for(d=open("a",0);read(d,&c,1);)putchar(c);}

Acknowledgments

1
source | link