/*
COURSE CSE2305 - Object-oriented Software Engineering

Aim:	To experiment with the debugger gdb.

Program Function:
	 Bug1 is used to write a word entered by the user to stdout.


*/

main(){

	char ReadInWord[1], *word;
	int i,c;

	printf("Do you wish to read in a word? (y/n) ");
	ReadInWord[0] = getchar();

	if(ReadInWord[0] = 'n'){
		fprintf("There aren't any words to be read\n");
	}else{
		for(i=0;(c=getchar())!= '\n'; i++); 
			*(word+i) = c;
		printf("The word entered is %s\n",word);
	}

}	

