0

I have a text file, and it is a paragraph with quotation marks, commas, periods, and spaces. I want my C program to scan only the letters into an array, while also making all of them lower case in the process. So if a text file said "Hello.", then the array would have: hello

Uclydde
  • 1,414
  • 3
  • 16
  • 33

1 Answers1

1

There are multiple solutions. Two of the more "common" would be

  1. Read everything into memory, then copy only the wanted characters to the main array while converting to lower-case.

  2. Read character by character, saving only the characters you want to save while converting to lower-case.

Both of these solutions are basically the same, they only differ in the actual file-reading part.

Some programmer dude
  • 400,186
  • 35
  • 402
  • 621