为什么运行内存出现错误
程序代码:
#include "stdafx.h" #include<stdio.h> #define MSG "You must have many talents .Tell me sonme " #define LIM 5 #define LINELEN 81 int main(void) { char name[LINELEN]; char talents[LINELEN]; int i; const char m1[40] = "Limeit yoursekf to one line s worth."; const char m2[] = "If you cant think of anyting fake it ."; const char *m3 = "\nEnough about me - what your name?"; const char *mytal[LIM] = {"adding numbers swiftly", "Mul tiplting accurayely","stashing data" "pollowing insreuctiongs to the leetter", "Understanding the c language"}; printf("Hi!i m clyde the computer", "i have many talents.\n"); printf("let me tell you some of them .\n");//21 puts("What wear they ? Ah yes here a partual list,");//22 for(i = 0; i < LIM; i++)//23 puts(mytal[i]);//24 puts(m3);//25 gets(name);//26 printf("well %s, %s\n", name, MSG); printf("%s\n%s\n", m1, m2); printf(talents); printf("let s see if i cs gor that list:"); puts(talents); printf("Thanks for the informatlos: %s.\n", name); getchar(); return 0; }