i have been able to read an array of bits from a text file using this code:
#define _CRT_SECURE_NO_DEPRECATE
#define WM_size  13056
#include<stdio.h>
int main()
{
char a;
FILE *point;
int i, bits[WM_size];
point = fopen("WM-bits.txt", "r");
for(i = 0; i <WM_size; i++) {
        a = fgetc( point); 
    bits[i] = atoi(&a);              
}
fclose(point);
for(i = 0; i < WM_size; i++) 
printf("%d" , bits[i]);  
getchar();
return  bits;}
what should i do if i don't know the number of bits in the .txt file? i actually want to write a function that returns the bits and length of them as the output.
my textfile is something like this: 0101011110110 ...