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

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

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

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