![](https://cos-cdn.shuashuati.com/pipixue-web/2020-1231-2005-12/ti_inject-812ce.png)
填空题 请补充main函数,该函数的功能是:从一个字符串中截取前面若干个给定长度的子字符串。其中,str1指向原字符串,截取后的字符存放在str2所指的字符数组中,n中存放需截取的字符个数。 例如,当str1="cdefghij",然后输入4,则str2="cdef"。 注意:部分源程序在文件BLANK1 .C中 。 请勿改动 main 函数和其他函数中的任何内容,仅在 main 函数的横线上填入所编写的若干表达式或语句。 #include
#include
#include
#define LEN 80 void main() { char str1[LEN],str2[LEN]; int n,i; system("CLS"); printf("Enter the string:\n"); gets(str1); printf("Enter the position of the stringdeleted:"); scanf(【1】); for(i=0;i