反转字符串.. [英] Reverse the string..

查看:82
本文介绍了反转字符串..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

反转字符串

1)只使用一个字符变量

2)不要使用数组

3)只有一个变量允许


Pl ..任何一个帮助...

解决方案

使用字符变量,不可能使用字符串,因为字符变量只能分配单个字符。


您应该使用''string''类型或数组来执行此操作。


我想知道这些愚蠢的生病的想法是什么?做到这一点,并且不要使用

某某并且只使用blablabla有点谜语。我也不喜欢这些

要求;它必须是家庭作业。


亲切的问候,


Jos


也许一个结构可以提供帮助,或者指向char的指针(嘿,它不是字面上的数组)。我想要这样的东西可能会有所帮助:

展开 | 选择 | Wrap | 行号

Reverse the string
1) Use only one character variable
2) Don''t Use array
3) Only one variable is allowed

Pl.. any one help ...

解决方案

With a character variable , it is not possible to work with a string since the character variable can be assigned only single chracter.

You should use ''string'' type or an array to do this.


I wonder what sick mind comes up with these silly "do this and that, don''t use
so and so and only use blablabla" kind of riddles all the time. I don''t like these
imperatives in the text either; it must be homework.

kind regards,

Jos


Perhaps a structure can help,or maybe pointer to a char(Hey,it''s not literally an array).I''ve thougth something like this might help:

Expand|Select|Wrap|Line Numbers


这篇关于反转字符串..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆