当前所在位置:珠峰网资料 >> 计算机 >> 软件水平 >> 正文
2015年软件水平程序员考试考前练习(9)
发布时间:2012/6/14 11:25:32 来源:城市网学院 编辑:ziteng
  #include
  #include
  fun(char *w,int n)
  {
  char t,*sl,*s2;
  s1=w;
  s2=w+n-1;
  while (s1  {
  t=*s1++
  *s1=*s2--
  *s2=t;
  }
  }
  main()
  {
  char *p;
  p=“1234567”;
  fun (p,strlen(p));
  puts(p);
  }
  谜底:1711717
  主若是认清嚣张S1=? S2=? 首先 S1=W,这S1存的是字符串W的首地址,而S2=W+N-1=P+7-1 OK,也就是W中最后一个字符的地址·
广告合作:400-664-0084 全国热线:400-664-0084
Copyright 2010 - 2017 www.my8848.com 珠峰网 粤ICP备15066211号
珠峰网 版权所有 All Rights Reserved