当前位置:网站首页>Function: store the strings entered in the main function in reverse order. For example, if you input the string "ABCDEFG", you should output "gfedcba".
Function: store the strings entered in the main function in reverse order. For example, if you input the string "ABCDEFG", you should output "gfedcba".
2022-07-04 00:41:00 【CTGU-Yoghurt】
subject :
Code details :
#include <stdio.h>
#include <conio.h>
#include <string.h>
#define N 81
void fun(char* str, int n)
{
/**********Program**********/
int i,t;
for (i = 0; i < n/2;i++) {
t = str[i];
str[i] = str[n - i - 1];
str[ n-i - 1] = t;
}
/********** End **********/
}
int main()
{
char s[N];
int l;
printf("input a string:"); scanf("%s", &s);
l = strlen(s);
fun(s, l);
printf("The new string is :"); puts(s);
}
边栏推荐
- 不得不会的Oracle数据库知识点(一)
- 功能:求5行5列矩阵的主、副对角线上元素之和。注意, 两条对角线相交的元素只加一次。例如:主函数中给出的矩阵的两条对角线的和为45。
- ISBN number
- What is the GPM scheduler for go?
- URL (data:image/png; Base64, ivborw0k... Use case
- The difference between objects and objects
- Test the influence of influent swacth on the electromagnetic coil of quartz meter
- (Introduction to database system | Wang Shan) Chapter V database integrity: Exercises
- Global and Chinese markets for coronary artery disease treatment devices 2022-2028: Research Report on technology, participants, trends, market size and share
- Five high-frequency questions were selected from the 200 questions raised by 3000 test engineers
猜你喜欢

OS interrupt mechanism and interrupt handler

Reading notes on how programs run
![[NLP] text classification still stays at Bert? Duality is too strong than learning framework](/img/49/1ff6025bdb0445e5638c1451e0b267.jpg)
[NLP] text classification still stays at Bert? Duality is too strong than learning framework

1-redis architecture design to use scenarios - four deployment and operation modes (Part 1)

基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能

Makefile judge custom variables

老姜的特点

Axure resources and prototype tool Axure RP 9 download

On the day when 28K joined Huawei testing post, I cried: everything I have done in these five months is worth it

Is it really possible that the monthly salary is 3K and the monthly salary is 15K?
随机推荐
2-Redis架构设计到使用场景-四种部署运行模式(下)
Celebrate the new year | Suihua fire rescue detachment has wonderful cultural activities during the Spring Festival
NLP Chinese corpus project: large scale Chinese natural language processing corpus
It's OK to have hands-on 8 - project construction details 3-jenkins' parametric construction
system. Exit (0) and system exit(1)
Interview script of Software Test Engineer
Five high-frequency questions were selected from the 200 questions raised by 3000 test engineers
1-Redis架构设计到使用场景-四种部署运行模式(上)
【leetcode】374. Guess the size of the number
Test the influence of influent swacth on the electromagnetic coil of quartz meter
Collation of the most complete Chinese naturallanguageprocessing data sets, platforms and tools
A method to solve Bert long text matching
Employees' turnover intention is under the control of the company. After the dispute, the monitoring system developer quietly removed the relevant services
关于 uintptr_t和intptr_t 类型
Network layer - routing
(Introduction to database system | Wang Shan) Chapter V database integrity: Exercises
MySQL winter vacation self-study 2022 12 (1)
ISBN number
Unity Shader入门精要读书笔记 第三章 Unity Shader基础
Is it really possible that the monthly salary is 3K and the monthly salary is 15K?