WSQ09 – Multipart Data and Files

Files flickr photo by T a k shared under a Creative Commons (BY-NC) license

Your Assignment

So for this assignment I would like to see you create a function that receives as parameter the name of a file (this would be a string value like data.txt) and your function counts the number of lines and the number of characters in the file which it returns as a single value (but with two values). You will want to look at how to create/define and return a struct value from a function and how to open and read text files line by line

What To Submit

As always a blog post, tag with #WSQ09 and perhaps put your code up on GitHub. Ask for help or input via our Facebook group.

Feature Image Credit

Files flickr photo by T a k shared under a Creative Commons (BY-NC) license

CC BY-SA 4.0 WSQ09 – Multipart Data and Files by Bauer Ken is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.