- Open the sequential file in read-only mode using the following code:
fp = fopen (argv [1],"r");
- If the file does not exist or does not have enough permissions, an error message will be displayed and the program will terminate. Set this up using the following code:
if (fp == NULL) { printf("%s file does not exist\n", argv[1]); exit(1); }
- One line is read from the file, as shown in the following code:
fgets(buffer, BUFFSIZE, fp);
- Each character of the line is accessed and checked for the presence of periods, as shown in the following code:
for(i=0;i<n;i++) if(buffer[i]=='.')
- If a period is found, the character following the period is checked to confirm whether it is in uppercase, as shown in the following code:
if(buffer[i] ...