Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
3 votes
0 answers
131 views

My Windows system ANSI code page is GBK, and I am working on a Windows console program. // SetConsoleOutputCP(65001); // Neither code page 936 nor 65001 affects the result. char utf8[] = { 0xE4, 0xB8, ...
3 votes
0 answers
62 views

I've been doing some exercises with printing to streams in C. Today I've been a bit confused: as I understand in most implementations of the C standard library, the default behaviour of stdout is ...
0 votes
3 answers
134 views

printf("foo: "); vs fputs("foo: ", stdout); As mentioned in the title, the string is not formatted and does not end in a new line (so no puts). I am not sure about overheads and ...
0 votes
3 answers
135 views

i'm doing calculation for result. user will input 3 type of result that is pass, fail & invalid. I need to have 1 more checking that is when user input result other than integer value it will be ...
0 votes
1 answer
123 views

I am working on a project in C language and my code keeps crashing of fputs command. This is the code: void entry_file_creation(int lc, int error_flag_line, char *source_file_name) { int j = 0; ...
Eitan Ratner's user avatar
1 vote
0 answers
46 views

Here is a minimal example that does not do what I expected after the counsel of the user in comments to original question. You can see the issue is not about fflush() because it is called after the ...
0 votes
2 answers
169 views

I have created this php script which takes a very long time to filter the CSV file into 19 smaller ones. The link for the CSV's is within this google drive line https://drive.google.com/drive/folders/...
grimx's user avatar
  • 5
0 votes
0 answers
38 views

I have opened the file in "r+" mode and tried to use fputs to replace old_line (line) with new_line (updated_line) char updated_line[] = "Hello This was ABCD"; fseek(fp, -(strlen(...
1 vote
1 answer
215 views

I try to add a new line to the already existing file, which already consists some text. I found out that when the file contains something, the program stops working after fputs(stringToAdd, myFile); ...
Maxymus 989's user avatar
0 votes
3 answers
132 views

I have written a code #include <stdio.h> #include <stdlib.h> int main() { FILE *fp; fp=fopen("lets.txt","r+"); if(fp==NULL) { printf("ERROR&...
Tar's user avatar
  • 15
0 votes
1 answer
84 views

I opened a file in rb+ mode successfuly Wrote two strings using two fputs. File ptr moved to 3 byte from file beginning using fseek. Read four characters successfuly using fgets. Now when I tried to ...
0 votes
0 answers
57 views

I'm programming a server with C and I send file with my client. I receive the file with my server and i want to write it on disk. I print it to be sure i had it. Everything are ok but when i write on ...
Amusing6028's user avatar
0 votes
3 answers
779 views

The first array prints all right. test[] = However, when the array is like in the second example, test[][] ={"...","..."}; I get an incompatible warning. In the second example with ...
Exponecial's user avatar
-1 votes
1 answer
428 views

The data in file is random and both alphabet and numbers. /**** Program to APPEND one file after another file ****/ #include <stdio.h> #include <fcntl.h> int main() { FILE *fp, *fc; ...
0 votes
1 answer
63 views

Trying to download files via the URL, rename from the .ADM extension to .txt then put contents of each file into a single txt file However its saying the fputs param 2 is a resource The $logfile['name'...
ChrisYates's user avatar

15 30 50 per page
1
2 3 4 5
...
9

AltStyle によって変換されたページ (->オリジナル) /