Answers for "c read file strings"

C
1

c read string

#include <stdio.h>
#define LEN 50

char text[LEN];
fgets(text,stdin,LEN);
//use text
Posted by: Guest on June-09-2021
0

c read a whole string from a file

#define  _GNU_SOURCE  //Necessary for getline to work with clang in Ubuntu
getline(&line, &len, fp);
Posted by: Guest on November-01-2020

Code answers related to "C"

Browse Popular Code Answers by Language