Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main (int argc, char **argv) {
- int integers[4] = { 1, 2, 3, 4};
- int arrayLength = 4;
- FILE *f = fopen ("file.bin", "wb");
- fwrite (&arrayLength, sizeof (int), 1, f);
- fwrite (integers, sizeof (int), arrayLength, f);
- fclose (f);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement