writing c codes for homework

I have homework for c++ class. I want someone to write the codes for me with the most simple and obvious way.

I want ONLY Problem 1: Bit-stream Buffer and Problem 3: Palindromes.