//======================================================
// Sample file-IO in C (written by Junbin)
//======================================================
//
// From: Teng Junbin [tengjunb@comp.nus.edu.sg]
// Sent: Monday, 08 March, 2004 12:47 PM
// To: Leong Hon Wai
// Subject: Re: [CS3233] -- Reminders...
// 
// Attached is the source file for input/output.
// 
// junbin
//

#include <stdio.h>

int main(void) {
	char buff[1000];

	freopen("data.in", "r", stdin);	// Redirect from file to standard input
	freopen("data.out", "w", stdout);	// Redirect standard output to file

	while (scanf("%s", buff) == 1) {
		printf("Data read: %s\n", buff);
	}

	return 0;
}
