Question:

C programming: reading a textfile and storing data into an structure array?

by  |  earlier

0 LIKES UnLike

say I have a text file that follows the format:

student last name student number student grade

for example:

smith 17892 82

peterson 12891 79

mcdonald 97022 93

and so on, and i want to read the text file that contains this data and then store it into structure array with data types

char student_name

char student_id

int student_grade

how can I do this? thanks.

 Tags:

   Report

1 ANSWERS


  1. You need a 2d array.

    It can hold the name number grade, in each row.

    go here and read

    http://www.lysator.liu.se/c/bwk-tutor.ht...

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.