当前位置:网站首页>Function: string storage in reverse order
Function: string storage in reverse order
2022-07-06 14:35:00 【|Light|】
requirement
Write a function , Make an input string stored in reverse order .
Code
#include<string.h>
#include<stdio.h>
/* * This function implements the reverse order of strings */
void reverse(char a[])
{
int i,j,l;
gets(a);
i = strlen(a);
int k=0;
l = i-1;
char b[i+1];
strcpy(b,a);
for(j=0;j<i;j++)
{
a[k] = b[l];
k=k+1;
l=l-1;
}
}
test
Test input
Be honest rather clever.
Output
.revelc rehtar tsenoh eB
边栏推荐
- 内网渗透之内网信息收集(二)
- 《统计学》第八版贾俊平第三章课后习题及答案总结
- 《统计学》第八版贾俊平第十一章一元线性回归知识点总结及课后习题答案
- How to test whether an object is a proxy- How to test if an object is a Proxy?
- 四元数---基本概念(转载)
- SystemVerilog discusses loop loop structure and built-in loop variable I
- DVWA (5th week)
- Attack and defense world misc practice area (GIF lift table ext3)
- captcha-killer验证码识别插件
- Intranet information collection of Intranet penetration (3)
猜你喜欢

“Hello IC World”

WEB漏洞-文件操作之文件包含漏洞

Statistics, 8th Edition, Jia Junping, Chapter VIII, summary of knowledge points of hypothesis test and answers to exercises after class

Intranet information collection of Intranet penetration (4)

链队实现(C语言)

内网渗透之内网信息收集(二)

Mysql的事务是什么?什么是脏读,什么是幻读?不可重复读?

四元数---基本概念(转载)

Markdown font color editing teaching

JDBC看这篇就够了
随机推荐
网络基础详解
Statistics 8th Edition Jia Junping Chapter 12 summary of knowledge points of multiple linear regression and answers to exercises after class
C language file operation
Statistics, 8th Edition, Jia Junping, Chapter 6 Summary of knowledge points of statistics and sampling distribution and answers to exercises after class
List and data frame of R language experiment III
An unhandled exception occurred when C connected to SQL Server: system Argumentexception: "keyword not supported:" integrated
Hackmyvm target series (2) -warrior
JDBC read this article is enough
【指针】查找最大的字符串
内网渗透之内网信息收集(二)
Uibutton status exploration and customization
安全面试之XSS(跨站脚本攻击)
SystemVerilog discusses loop loop structure and built-in loop variable I
XSS (cross site scripting attack) for security interview
链队实现(C语言)
Sentinel overall workflow
Statistics 8th Edition Jia Junping Chapter 3 after class exercises and answer summary
Detailed explanation of network foundation routing
浙大版《C语言程序设计实验与习题指导(第3版)》题目集
Xray and burp linkage mining