#include<malloc.h>

    char **ptr;

    .
    .
            /* set pointer to allocated space for 100 chars    */
    if(!(ptr = (char **)malloc(100)))
        return ERROR;
    .
    .
    .
            /* reallocate pointer space    for 200 chars    */
    if(!(ptr = (char **)realloc(ptr,200)))
        return ERROR;
