Tag archives: C

RSS feed of C

linux c library function to read binary file code

linux c library function to read binary file code

struct person
{
    int id;
    char name[20];
    int age;
    int sex;
    char tel[20];
};


int main(int arg, char *args[])
{
    FILE *p = fopen(args[1], "w");
    if (p == NULL)
    {
        printf("error is %s\n", strerror(errno));
    } else
    {
        printf("success\n");
        struct person man;
        memset(&man, 0 ...

Continue reading