hi guys

I have a program where I read data char by char and store them into a buffer.Every byte I read I want to put it in the buffer so I do this:

Code:
char buf[128];
char c;
//read one char
buf+= c;
Is this correct?
Also when I meet a certain character I have to check the previous one.How can I achieve that?
Thanks in advance