当前位置:网站首页>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
边栏推荐
猜你喜欢
Intranet information collection of Intranet penetration (5)
Hackmyvm target series (2) -warrior
关于超星脚本出现乱码问题
Tencent map circle
JDBC transactions, batch processing, and connection pooling (super detailed)
Xray and burp linkage mining
Captcha killer verification code identification plug-in
图书管理系统
Build domain environment (win)
Mysql的事务是什么?什么是脏读,什么是幻读?不可重复读?
随机推荐
攻防世界MISC练习区(gif 掀桌子 ext3 )
Windows platform mongodb database installation
外网打点(信息收集)
SQL injection
循环队列(C语言)
Network technology related topics
servlet中 servlet context与 session与 request三个对象的常用方法和存放数据的作用域。
XSS之冷门事件
Chain team implementation (C language)
《统计学》第八版贾俊平第三章课后习题及答案总结
安全面试之XSS(跨站脚本攻击)
Detailed explanation of network foundation
Network layer - simple ARP disconnection
Overview of LNMP architecture and construction of related services
5分钟掌握机器学习鸢尾花逻辑回归分类
Hcip -- MPLS experiment
《统计学》第八版贾俊平第二章课后习题及答案总结
msf生成payload大全
SystemVerilog discusses loop loop structure and built-in loop variable I
Database monitoring SQL execution