欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

標題: 字符串認識 [打印本頁]

作者: xiaojuan    時間: 2014-9-17 14:36
標題: 字符串認識


#include<stidio.h>

#define MSG "You must have many talents. Tell me something."
#define LIM 5
#define LINELEN 81

int main (void)
{
char name[LINELEN];
char talents[LINELEN];  //這兩個為字符變量數組的定義,前面的const就是一種定義模式,放在這個位置與首位置意思一樣,分號不可以少
int i;
const char m1[40] = "Limit yourself to one line's worth";
const char m2[ ] = "If you can't think of anything fake it";
const char *m3 = "\nEnough about me-what's your name?"; //指針的方法,這樣寫相當于首字母的地址被表示進行就可以了

const char *mytal[LIM] = {
        "Adding number swiftly",
        "Multiply accurately",
        "Stashing date",
        "Following instructions to the letter",
        "Understanding the C language",
        }; //與for語句的配合注意
printf ("Hi! I'm Clyde the Computer." "I have many talents");
printf ("Let me tell your some of them.\n");
puts ("What were they? Ah,yes,here's a partial list.");
for (i=0; i
  puts(mytal[i]);
puts(m3);  //輸入
gets(name);  //輸出
prinf ("Well,%s,%s\n",name, MSG);
printf ("%s\n%s\n",m1,m2);
gets(talents);
puts("Let's see if l've got that list:");
puts(talents);
printf("Thanks for the information.%s\n",name);
return 0;
}







歡迎光臨 (http://www.raoushi.com/bbs/) Powered by Discuz! X3.1