what are these numbers in c language ?

#include <stdio.h>

int main(){
FILE *file = fopen("test.txt", "ab");

fwrite("hello world", 1,4, file);
}
#include <stdio.h>

int main(){
FILE *file = fopen("test.txt", "ab");

fwrite("hello world", 1,4, file);
}
what is 1 and 4 ?? if i am not mistaken 4 is the number of bytes to read and 1 is the size of the byte which means i can increase the size of 1 to wherever i want to present unicodes am i wrong ?
2 Replies
split
split10mo ago
Any question you have about the c/c++ API, use man pages: https://man7.org/linux/man-pages/man3/fwrite.3p.html 1 is the size of the element in bytes, 4 is how many elements you want to write Yes if you were to write Unicode, you would increase the element size
.maverk
.maverk10mo ago
one represents the ascii size ?