当前位置:网站首页>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
边栏推荐
- JDBC看这篇就够了
- Pointeurs: maximum, minimum et moyenne
- Statistics, 8th Edition, Jia Junping, Chapter 6 Summary of knowledge points of statistics and sampling distribution and answers to exercises after class
- Intel oneapi - opening a new era of heterogeneity
- DVWA (5th week)
- sqqyw(淡然点图标系统)漏洞复现和74cms漏洞复现
- Matplotlib绘图快速入门
- High concurrency programming series: 6 steps of JVM performance tuning and detailed explanation of key tuning parameters
- Uibutton status exploration and customization
- An unhandled exception occurred when C connected to SQL Server: system Argumentexception: "keyword not supported:" integrated
猜你喜欢
《统计学》第八版贾俊平第十四章指数知识点总结及课后习题答案
Based on authorized access, cross host, and permission allocation under sqlserver
《统计学》第八版贾俊平第十三章时间序列分析和预测知识点总结及课后习题答案
关于超星脚本出现乱码问题
Circular queue (C language)
浅谈漏洞发现思路
JDBC事务、批处理以及连接池(超详细)
《统计学》第八版贾俊平第五章概率与概率分布
sqqyw(淡然点图标系统)漏洞复现和74cms漏洞复现
Web vulnerability - File Inclusion Vulnerability of file operation
随机推荐
Web vulnerability - File Inclusion Vulnerability of file operation
Circular queue (C language)
安全面试之XSS(跨站脚本攻击)
Intranet information collection of Intranet penetration (3)
数字电路基础(四) 数据分配器、数据选择器和数值比较器
Statistics, 8th Edition, Jia Junping, Chapter 11 summary of knowledge points of univariate linear regression and answers to exercises after class
The difference between layer 3 switch and router
Numpy快速上手指南
《统计学》第八版贾俊平第十二章多元线性回归知识点总结及课后习题答案
《统计学》第八版贾俊平第三章课后习题及答案总结
线程的实现方式总结
关于超星脚本出现乱码问题
指针 --按字符串相反次序输出其中的所有字符
【指针】删除字符串s中的所有空格
{1,2,3,2,5}查重问题
Database monitoring SQL execution
On the idea of vulnerability discovery
指針:最大值、最小值和平均值
【指针】八进制转换为十进制
Data mining - a discussion on sample imbalance in classification problems