#include <stdio.h>

main()
{
	FILE *fp;		/* file pointer */
	char s[16];	/* 15 chars max., plus a null */

	/*
	 * Try to open the file.  If this
	 * fails, we just print an error.
	 */
	if ((fp = fopen("foo", "r")) == NULL) {
		printf("Cannot open foo.\en");
		exit(1);
	}

	/*
	 * Now get a string of 15 characters.
	 */
	fscanf(fp, "%15s", s);

	/*
	 * Now print out the string to standard
	 * output.  
	 */
	printf("%s", s);

	/*
	 * Now close the file.
	 */
	fclose(fp);
}
