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 -

android - IBM Worklight 6.1 [Application Error] There was a network error (file:///android_asset/www/index.html) -