SyntaxFix
Write A Post
Hire A Developer
Questions
Why don't you just use the array of chars you have? This ought to do it:
source[i] = getc(fp); i++;