字符翻转
来源:互联网 发布:淘宝网怎么卖二手东西 编辑:程序博客网 时间:2024/05/18 08:15
#include<stdio.h>#include<malloc.h>#include<string.h>struct strList{char *words;strList *pNext;}strList *createStrList(){strList *p;p=(strList *)malloc(sizeof(strList));if(NULL==p){return -1;}else{p->words=NULL;p->pNext=NULL;return p;}}void insertList(strList *pHead,char *inputWord){int inputSLen=0;strList *tempList=NULL,*p;if(NULL==pHead){return;}inputSLen=strlen(inputWord);p=pHead;if(NULL==pHead){strncpy(p->words,inputString,inputSLen);}else{tempList=(strList *)malloc(sizeof(strList));while(NULL!=p){p=p->pNext;}p->pNext=tempList;tempList->pNext=NULL;strncpy(p->words,inputString,inputSLen);}}void revertWord(char *inputWord){int nStrLen=0;int crtNum=0;int i,j;int pos1,pos2;char temp1,temp2;nStrLen=strlen(inputWord);for(i=0;i<nStrLen;i++){if((inputWord[i]>='a'&&inputWord[i]<='z')||(inputWord[i]>='A'&&inputWord[i]<='Z')){crtNum++;}}if(crtNum%2==0){for(i=0;i<crtNum/2;i++){temp=inputWord[]}}}void revet(char *inputString,char *outputstring){}
0 0
- 字符翻转
- 字符翻转
- 字符数组的翻转
- 字符数组的翻转
- 翻转字符串中的字母字符
- JavaScript编程实现字符和字符串翻转
- 翻转字符句子中单词顺序
- 华为OJ:字符逆序和单词翻转
- 由翻转字符窜再次理解递归
- [算法]1.字符的翻转问题
- 翻转
- 翻转
- 翻转
- PHP字符串翻转函数 支持中文字符(GBK编码)
- 编程实现字符中各单词的翻转
- JAVA不借助工具类翻转字符,数组
- Reverse Words in a String(字符翻转)
- 确定两串乱序同构 、原串翻转、确定字符互异
- 架构设计分享之权限系统(看图说话)
- HDOJ 题目3232Crossing Rivers(数学期望)
- new/delete ,malloc与free
- 2014年度总结
- HDU1018 Big Number(求阶乘位数)
- 字符翻转
- 减少等待提高体验——DNS预解析技术:DNS Prefetch
- Big Event in HDU(母函数)
- UIApplication
- 数组或者list最大值最小值
- SQL 分页方法
- XMPP协议及实践
- 学java教程之访问权限
- Binary Tree Postorder Traversal