当前位置:网站首页>Longest word in output string
Longest word in output string
2022-06-22 23:21:00 【holoyh】
#include<Stdio.h>
int main()
{
char str[80] = "this isndnsjfida is a pencil good ";
char *p,*s = str;
int num=0,max = 0;
while(*s)
{
while(*s&&(*s>='a'&&*s<='z'||*s>='A'&&*s<='Z'))
{
num++;
s++;
}
if(num > max)
{
max = num;
p = s;
}
num = 0;
while(*s&&*s==' ')
{
s++;
}
}
*p = 0;
puts(p-max);
}pencil
边栏推荐
猜你喜欢

2021-04-05

2021-08-21

Install the typescript environment and enable vscode to automatically monitor the compiled TS file as a JS file

Learning the interpretable representation of quantum entanglement, the depth generation model can be directly applied to other physical systems

AutoCAD - five annotation shortcuts

Common operations of sourcetree version management

Three cache methods and principles

C sqlsugar, hisql, FreeSQL ORM framework all-round performance test vs. sqlserver performance test

2021-08-26

Freshman girls' nonsense programming is popular! Those who understand programming are tied with Q after reading
随机推荐
2020-12-20
OJ每日一练——病毒的增生
剑指 Offer 11. 旋转数组的最小数字
数据库访问工具简介
2021-03-06
How to change the dial on the apple Watch
A SQL optimization case using order by and rownum
Spark SQL 访问json和jdbc数据源
Spark SQL Start(2.4.3)
2020-12-20
口令安全是什么意思?等保2.0政策中口令安全标准条款有哪些?
swagger2 使用方法
SourceTree版本管理常用操作
【22暑期复建1】 Codeforces Round #791 (Div. 2)
Redis big key problem
Finding the value of the nth term of Fibonacci sequence by recursion
启牛app下载证券开户,是安全的吗?有风险嘛?
A spark app demo
使用HBuilder X编辑器安装终端窗口插件未响应的解决方案
OJ每日一练——跨越2020