用指针实现输入一个字符串,按相反次序输出其中的所有字符。
输入时指针向后移动,输出时指针向前移动。 #include main() {char a[80],*p=a,i; gets(p); for(i=strlen(p)-1;i>=0;i--)putchar(*(p+i)); }
扫描二维码免费使用微信小程序搜题/刷题/查看解析。
版权声明:本文由翰林刷题小程序授权发布,如需转载请注明出处。
本文链接:https://doc.20230611.cn/post/442146.html
上一篇:Complete the following statements with proper words or expressions according to the course book.Words such as “vicious, tyrant, determined, famous, notorious” usually indicate the speaker’s attitude towards the person or thing in question. Th
下一篇:预防小儿佝偻病最经济、最方便、最安全又有效的方法是______。