Convert Char to String in C -


how convert character string in c. i'm using c = fgetc(fp) returns character. need string used in strcpy

to answer question without reading else would

char str[2] = "\0"; /* gives {\0, \0} */ str[0] = fgetc(fp); 

you use second line in loop ever other string operations want keep using char's strings.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -