From: "Sergey Kovalev" Newsgroups: comp.os.msdos.djgpp Subject: Why so? Date: Thu, 26 Jul 2001 15:53:34 +0300 Lines: 37 Message-ID: <9jp3tu$vb6c$1@ID-89475.news.dfncis.de> NNTP-Posting-Host: 193.232.250.249 X-Trace: fu-berlin.de 996152070 1027276 193.232.250.249 (16 [89475]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi all! I have a code: #include #include #include #include int main() { char *str; str=(char*)malloc(10); clrscr(); str="01234"; puts(str); printf("%s\n",str); strcat(str,"567"); puts(str); printf("%s\n",str); return 1; } Why this code produces following results? 01234 01234 01234567 67 Other compilers give me: 01234 01234 01234567 01234567