OK, time to have a laugh. I'm a first year digital forensics student and part of my course deals with C (ANSI C) programming. I have been given an exercise whereby I have to write a C program that will open a file, read it and either find and delete or find and replace characters (I.e- wherever I find a lowercase at the start of a sentence it should be made uppercase ( ^ 0x20 maybe??), and any instance where 'i' is on it's own it should also be made uppercase. The text file contains lots of characters such as & etc in the middle of words and needs punctuating('.' periods) etc. I thought about using an array...but I don't know how to use them that well. What I got so far is -:
Code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys\stat.h>

	void main (void)
 {
	FILE *inputFile; 				
	FILE *outputFile;
	char input1,input2,input3;

		

        	inputFile=fopen("inputfile.txt","r");
        	outputFile=fopen("outputfile.txt","w");
        	input1=fgetc(inputFile);	
        	input2=fgetc(inputFile);
        	input3=fgetc(inputFile);
        	fprintf(outputFile,"%c",input1,input2,input3);
			
	do
	if (input1==' ' && input2=='i' && input3==' ')
		{	
			input1 = input2 ^ 0x20;
		}			
		while (input1,input2,input3 !=EOF);

}
This only reads the first character of the file and won't read past it or correct anything...any help would be greatly appreciated.
(I have attached the file with the text in)

Thanks to anyone who can help