博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
c语言 字符串字符反向储存_反向字符串的C ++程序
阅读量:2507 次
发布时间:2019-05-11

本文共 695 字,大约阅读时间需要 2 分钟。

c语言 字符串字符反向储存

Here you will get C++ program to reverse a string.

在这里,您将获得C ++程序来反转字符串。

The user is asked to enter a string and then the reverse of the string is displayed.

要求用户输入一个字符串,然后显示该字符串的反面。

For example:

例如:

Input String: hello

输入字符串:hello

Output String: olleh

输出字符串:olleh

反向字符串的C ++程序 ( C++ Program to Reverse a String)

#include
#include
#include
 int main(){ char a[50],temp; int i,j,len; cout<<"Enter any string:\n"; gets(a); len=strlen(a);  cout<<"Reverse of the string is: ";  for(i=0,j=len-1;i

Output

输出量

C++ Program to reverse a string

Comment below if you are facing any difficulty to understand above program.

如果您在理解上面的程序时遇到任何困难,请在下面评论。

翻译自:

c语言 字符串字符反向储存

转载地址:http://ngwwd.baihongyu.com/

你可能感兴趣的文章
Tree
查看>>
Java学习之i/o系统
查看>>
laravel 视图组件
查看>>
[转发]Oauth 1.0 1.0a 和 2.0 的之间的区别有哪些?
查看>>
animation
查看>>
mysqldump的几个主要选项探究
查看>>
程序员修炼之路
查看>>
动态规划的基本模型
查看>>
php生成xml文件方法
查看>>
.Net邮箱的使用
查看>>
Go语言引用类型
查看>>
nodejs学习
查看>>
顺序表的实现
查看>>
青蛙跳圆周
查看>>
SGU 102
查看>>
创建http服务器
查看>>
memcache服务端与客户端的安装部署
查看>>
坐标间获取两点距离
查看>>
递归方法-库存填充
查看>>
第五节20181117
查看>>