摘要: 1、输入一个字符串和一个正整数x,将该字符串中的后x个字符复制到另一个字符串y中,输出字符串y;再对y串的内容前后倒置后存入数组z中并输出。 要求:用指针访问数组元素、用函数getx(char *c1)实现复制、用函数getr(char *c2)实现倒置。 运行示例 Enter a string: abcABCD Enter an integer: 4 The new string is: ABCD The invert string is: DCBA#include#includevoid getx(char *c1);void getr(char *c2);int x;int main(v 阅读全文
posted @ 2013-11-21 16:14 wuyanlong 阅读(159) 评论(0) 推荐(0) 编辑