Multipart Data and Files – (WSQ09)

The 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

 

My text data:

WSQ09 - txt.data.PNG

My Sourcecode:

WSQ09 - SourceCode.PNG

The result:

WSQ09 - Ergebnis.PNG