I works very well now as far as I can tell. Thank you so much.
Code:
#define LINE_SIZE 200
# include <stdio.h>
# include <stdlib.h>
int main ()
{
FILE *fp;
fp = fopen ("somefile.txt", "r");
if (fp == NULL)
{
puts("Could not open the file");
exit(0);
}
int i, ch, m, n;
ch = 0;
char line [LINE_SIZE];
printf ("Press 'q/Q' to quite and any other key to continue");
while ((ch=getchar()!='q') || (ch == 'Q'))
{
fgets(line, LINE_SIZE, fp);
printf (" \n Enter the value of starting column ");
scanf("%d", &m);
printf (" \n Enter the value of ending column ");
scanf ("%d", &n);
int columCounter;
for (columCounter = m; columCounter < n+1; columCounter++)
putchar(line[columCounter]);
printf ("\nPress 'C/c' to continue or 'q/Q' to quite");
ch = getchar();
}
}