home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
progm
/
ctutor2.zip
/
ANSWERS
/
CH07_1.C
< prev
next >
Wrap
Text File
|
1989-11-10
|
866b
|
37 lines
main()
{
int index;
char string1[6], string2[6], string3[6], all_three[18];
strcpy(string1,"one");
strcpy(string2,"two");
strcpy(string3,"three");
strcpy(all_three,string1);
strcat(all_three," ");
strcat(all_three,string2);
strcat(all_three," ");
strcat(all_three,string3);
for(index = 0;index < 10;index = index + 1)
printf("The final string is ---> %s\n",all_three);
}
/* Result of execution
The final string is ---> one two three
The final string is ---> one two three
The final string is ---> one two three
The final string is ---> one two three
The final string is ---> one two three
The final string is ---> one two three
The final string is ---> one two three
The final string is ---> one two three
The final string is ---> one two three
The final string is ---> one two three
*/