当前位置:网站首页>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);
}
边栏推荐
- It's OK to have hands-on 8 - project construction details 3-jenkins' parametric construction
- Reading notes on how programs run
- The FISCO bcos console calls the contract and reports an error does not exist
- 不得不会的Oracle数据库知识点(一)
- 国元证券开户是真的安全可靠吗
- 网上的低佣金链接安全吗?招商证券怎么开户?
- Subgraph isomorphism -subgraph isomorphism
- Global and Chinese market of underwater bags 2022-2028: Research Report on technology, participants, trends, market size and share
- What is the future of software testing industry? Listen to the test veterans' answers
- Weekly open source project recommendation plan
猜你喜欢

Beijing invites reporters and media
![[prefix and notes] prefix and introduction and use](/img/a6/a75e287ac481559d8f733e6ca3e59c.jpg)
[prefix and notes] prefix and introduction and use

Pytest unit test framework: simple and easy to use parameterization and multiple operation modes

ESP Arduino playing with peripherals (V) basic concept of interrupt and timer interrupt

Self study software testing. To what extent can you go out and find a job?

Interview script of Software Test Engineer

OS interrupt mechanism and interrupt handler

Network layer - routing
![Several ways to set up a blog locally [attach relevant software download links]](/img/2f/51a09d9ef71065319ed90306517854.jpg)
Several ways to set up a blog locally [attach relevant software download links]
![[PHP basics] cookie basics, application case code and attack and defense](/img/7c/551b79fd5dd8a411de85c800c3a034.jpg)
[PHP basics] cookie basics, application case code and attack and defense
随机推荐
Detailed explanation of the relationship between Zhongtai, wechat and DDD
Several ways to set up a blog locally [attach relevant software download links]
Att & CK actual combat series - red team actual combat - V
gslb(global server load balance)技术的一点理解
[error record] configure NDK header file path in Visual Studio (three header file paths of NDK | ASM header file path selection related to CPU architecture)
A Kuan food rushed to the Shenzhen Stock Exchange: with annual sales of 1.1 billion, Hillhouse and Maotai CCB are shareholders
(Video + graphics and text) introduction to machine learning series - Chapter 4 naive Bayes
The FISCO bcos console calls the contract and reports an error does not exist
数据库表外键的设计
Reading notes on how programs run
[C language] break and continue in switch statement
8. Go implementation of string conversion integer (ATOI) and leetcode
Regular expressions and text processors for shell programming
[error record] configure NDK header file path in Visual Studio
Pytest unit test framework: simple and easy to use parameterization and multiple operation modes
MySQL is installed as a Windows Service
What does redis do? Redis often practices grammar every day
2020.2.14
2-redis architecture design to use scenarios - four deployment and operation modes (Part 2)
Global and Chinese markets for instant saliva testing devices 2022-2028: Research Report on technology, participants, trends, market size and share