/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/* a sample program that displays a string. */
#include <stdio.h>
#include <string.h>

int main() {
    char str[80],*p;
    
    strcpy(str,"this is a test");
    p = strdup(str);   /* copy the content of str */
    if(p) {
      printf("%s\n",p);
      free(p);
    }
    else {
      printf("strdup() failed\n");
    }
}

