Skip to main content
Engineering LibreTexts

20: File I/O and Array Functions

  • Page ID
    10372
    • 20.1: File Input and Output
      A file consisting of characters from the ASCII character code set. Text files (also know an ASCII text files) contain character data. When we create a text file we usually think of it consisting of a series of lines. On each line are several characters (including spaces, punctuation, etc.) and we generally end the line with a return (this a character within the ASCII character code set).
    • 20.2: Arrays and Functions
      Arrays are an important complex data type used in almost all programming. We continue to concentrate on simple one dimension arrays also called a list. Most programmers develop a series of user defined specific task functions that can be used with an array for normal processing.
    • 20.3: Loading an Array from a File
      Loading an array from a file presents an interesting dilemma. The problem resolves around how many elements you should plan for in the array. Let’s say 100, but what if the file has fewer or more than 100 values. How can the program handle it correctly?
    • 20.4: Math Statistics with Arrays
      Arrays are an important complex data type used in almost all programming. We continue to concentrate on simple one dimension arrays also called a list. Most programmers develop a series of user defined specific task functions that can be used with an array for normal processing.
    • 20.5: Practice 19 File I/O and Array Functions