5 int main (int argc
, char ** argv
)
10 len
= strlen (argv
[0])-2;
13 str
= malloc (len
+ 1); /* MLK */
15 strncpy (str
, argv
[0], len
);
18 printf ("str=%s\n", str
);
20 str
= strdup (argv
[0]); /* MLK */
22 printf ("str=%s\n", str
);
24 str
= strdup ("hallo"); /* MLK */
26 printf ("str=%s\n", str
);
28 str
= strdup (str
); /* MLK */
30 printf ("str=%s\n", str
);