C Language Text File [Closed]

Asked 2 years ago, Updated 2 years ago, 484 views

Do you want to improve this question?Edit your post to clarify the issue you are trying to resolve by adding details.

Closed to 9 months ago

9 months ago

Please tell me how to display a specific line from a text file with 197 rows and 7 columns.
For example
India 3287263 131224 Indonesia 1910931 26691 Uzbekistan 448969 3325
Oman 309980461
Kazakhstan 2724902 1851 Qatar 11627279 Cambodia 181035 1528

If you type India, you'll see the number next to the line.
The results are
Area of India (km2) = 3287623 Population (all) = 131224
I want to make it look like this

c text-file

2022-09-30 22:01

1 Answers

Read the file one line at a time from the beginning and view the line if you have the keyword.


2022-09-30 22:01

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.