swapping char return values with bool from stdbool.h in dynamic array