Answers for "c save string to struct"

C
2

c copy string

char *str = "Hello World!";
char copy[64];		// or 'char *copy = malloc(strlen(str) + 1);'
strcpy(copy, str);
Posted by: Guest on March-22-2020
0

c file struct

typedef struct _iobuf
{
    char*   _ptr;
    int _cnt;
    char*   _base;
    int _flag;
    int _file;
    int _charbuf;
    int _bufsiz;
    char*   _tmpfname;
} FILE;
Posted by: Guest on May-15-2020

Code answers related to "C"

Browse Popular Code Answers by Language