TableOfContents

实验要求

实验1-1

实验2-1

1. 实验目的

2. 实验内容

写一个函数strinsert(s, n, t)在字符串s的第n个字符后面插入字符串t。比如:

   1 char s[100] = "write everywhere";
   2 char t[] = "once, run ";
   3 strinsert(s, 6, t);
   4 printf("%s", s); 

输出: {{{write once, run everywhere }}}

实验2-2

1. 实验目的

2. 实验内容

写两个函数

for example:

   1 char s[20]="hello world";
   2 char t[20]="hello world";
   3 strcrop(s, 1, 8);
   4 strdel(t, 1, 8);
   5 printf("%s\n%s\n", s, t); 

output:

ello wor
hld 

实验2-3

1. 实验目的

熟悉指针数组的使用

2. 实验内容

写一个函数weekday(y,m,d),求取y年m月d日是星期几,返回星期几的名字。例如:

   1 printf("%s", weekday(2006,3,6));

输出

ch3n2k.com | Copyright (c) 2004-2020 czk.