Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8856161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:17:50+00:00 2026-06-14T14:17:50+00:00

Here is my problem: I read from a .csv file and put every characters

  • 0

Here is my problem: I read from a .csv file and put every characters of such file into a 1D array of, say, 500 characters (I know that the number of characters in the .csv file won’t ever reach such number, so it is fine). The thing is, I want to add a new line at the end of my .csv file. Since I need to do some operation on the characters before putting it in the file, I would like to add the content of such line at the end of my array, well, at the index before EOF. Is there an easy way to scan through my whole array and find where to put the new content?

For instance, my array would look something like this:

[ j o h n ,   p a s s 1 2 ,   u s e r (...remaining empty spaces, i.e RES) ]
[ j o h n ,   p a s s 1 2 ,   u s e r   j o e y ,   h e l l o 9 ,   u s e r (RES) ]  

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:17:51+00:00Added an answer on June 14, 2026 at 2:17 pm

    To seek to the end of the file, you do:

    fseek(file, 0, SEEK_END);
    

    So to seek to one position before the end of the file, you would do:

    fseek(file, -1, SEEK_END);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to load a simple .CSV file from JS (That's not the problem
Current problem: Target is to copy data from a source .csv file to a
here's the issue I have a csv file which I read.csv(), and prints to
Currently I'm writing a method to read data from a CSV file and import
I have read a lot of related topics here regarding this problem but I
I've read Head First Java, and I understand how OOP works. Here's my problem:
here is the gist of the problem. If you want then you can read
date here my problem: String datetime = 2012-03-24 23:20:51; I know that that string
I have a problem here im trying to upload a file first time it
I'm working on a project and I need to read a CSV file and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.