正在加载图片...
例 strcpy与strcat举例 Ch6 2L c #include <string.h> 1 u #include <stdio.h> 22 r void main() 3 b char destination[25]; 0 char blank[]=""cl]="C++", turbo[]"Turbo"; 6 0 strcpy(destination,turbo); 7 strcat(destination,blank); 969 strcat(destination,c); 9。 printf("%os n",destination); Turbo C++例 strcpy 与strcat举例 #include <string.h> #include <stdio.h> void main() { char destination[25]; char blank[] = " ", c[]= "C++", turbo[] = "Turbo"; strcpy(destination, turbo); strcat(destination, blank); strcat(destination, c); printf("%s \n", destination); } Turbo C++ TrboC++ 0123456789 u\0 24 . Trbo 0123456789 u\0 24 . . Trbo\0 0123456789 u 24 .
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有