1,639 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
2
answers
153
views
using fread function to get the list of students from file
I have to write into a file the records of students (id, name, percentage) and get the list of those students who have scored percentage equal to or more than 90. The output prints in infinite loop. ...
1
vote
3
answers
172
views
How can I read multiple csv files from within multiple zip files with sometimes different columns using R fread?
I'm trying to read in a lot of data as efficiently as possible; the data are in about 1,400 CSV files within 6 individual ZIP files. The CSV files are all similar timeseries data with the same columns,...
1
vote
1
answer
119
views
The data is changed after fwrite and fread
I am trying to store several columns of the data, and then merge them with the other data when necessary. However, the data could only be merged with other data when I created it at the start, and it ...
2
votes
1
answer
82
views
fread second pass give segmentation fault
if i compile and execute the following code, all goes fine
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *FILE_LICENCE;
char* LICENCE_F = "Lc";
int RC;
char* MSG = ...
2
votes
2
answers
218
views
Why as directly using fread() return value as an Index considered bad?
I recently got scolded real bad for writing the following:
/**
* @brief Reads metadata from a .meta file associated with a <internal directory format> directory.
*
* This function reads the ...
4
votes
1
answer
141
views
What is the standard behavior of fread in C on Windows?
Nominally, I expected fread using "rb" mode to interpret carriage return and linefeed as-is (\r as "\r",\n as "\n"). But my mingw compiler downloaded from "Winlib&...
0
votes
0
answers
31
views
How do fread and malloc affect RAM utilization in encryption process?
I am working on an application (Linux based) that uses AES-256 encryption and observed a significant increase in RAM usage during encryption. Initially, the process consumes about 3 MB of RAM (checked ...
2
votes
1
answer
90
views
problems with fseek and fread in C
I'm having an issue with fseek and fread. For some reason, using fseek (f, 0, SEEK_END); will not give me the end of my file, and instead go 1000 bytes farther, giving me junk data and generally being ...
1
vote
1
answer
101
views
Why is fread() not working, but fwrite() works fine?
I am working with an NXP microcontroller, which has stdio functionality when connected to the debugger. I've had no issues using fwrite() to write data to a binary file, so that I can monitor and plot ...
1
vote
1
answer
111
views
What separator to set in text files with complicated string entries (that include all the standard separators)
I have a large dataset (3.6 billion lines, 20 columns, I'm working in manageable chunks of 1m rows). My cells can include entries like this string:
"sometext "some other text"... ; , &...
Jakob's user avatar
- 1,463
0
votes
0
answers
25
views
Get into a file offset problem fread & ftell problem [duplicate]
I'm doing a C projct on Windows, using VScode and compile my code with gcc.
I get into some offset problem that might be caused by fread() | ftell().
I read 256 counts of data from my binary file.
And ...
4
votes
2
answers
126
views
Trying to understand fread
I have a datafile.
#version 460 core
out vec4 FragColor;
void main()
{
FragColor = vec4(1.0f, 0.5f, 0.2f, 1.0f);
}
And I am trying to read the contents of it with fread.
FILE *fshader;
...
0
votes
0
answers
23
views
PHP: Is feof() always required for fread()? [duplicate]
In PHP feof() tests for the end of file, but the documentation says that fread() would stop once the end of file is reached:
fread() reads up to length bytes from the file pointer referenced by
...
3
votes
1
answer
258
views
Valgrind gives an error "Invalid read of size 4"
I'm reading float data in from a file and Valgrind gives the error "Invalid read of size 4". I'm a new user of Valgrind and don't understand why I get this error.
My code is:
int main()
{
...
1
vote
0
answers
56
views
PHP/Apache 2.4 streaming output data size / chunck size issue
I'm having issue streaming output from PHP script smoothly after upgrading OS, Apache and PHP.
I have a shell script that executed by a PHP script, its take between 1 to 2 minutes to complete, the ...