Impetus Technologies Interview Question

How to allocate memory in String?