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

Autor: touchthestarswithtecgda

I've set up this Wordpress blog because I'm in 2 courses of Ken Bauer. He is a super professor at Tec de Monterey University in Guadalajara. I attend the courses "Solutions to Problems with Programming" and "Computer and Information Security". To my personality: - I am an exchange student from Detschland. - I study business engineering - I have a lot of fun in Mexico

Hinterlasse einen Kommentar