Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
int number_of_ints = 27; /* Could be read from file or calculated */
int *my_ints = malloc(number_of_ints * sizeof(int));
if(! my_ints) { /* Handle malloc failure error here */ }
/* Now my_ints points to 27 ints of storage space */
like so:int fseek(FILE* stream, long offset, int origin);
Sets file position for stream stream. For a binary file, position is set to offset characters from origin, which may be SEEK_SET (beginning), SEEK_CUR(current position) or SEEK_END (end-of-file); for a text stream, offset must be zero or a value returned by ftell (in which case origin must be SEEK_SET). Returns non-zero on error.
long ftell(FILE* stream);
Returns current file position for stream stream, or -1L on error.
//without error checking
int size = 0;
int file = fopen(...);
fseek(file,SEEK_END); //go to the end
size = ftell(file); //get current position
fseek(file,SEEK_SET); //go back to the begining