当前位置: 首页 > news >正文

金融做网站黄页引流推广网站

金融做网站,黄页引流推广网站,网站建设所有权,网站建设电话客服话术字符型数组的定义和初始化 char s[] "hello";:在栈上开辟空间并初始化。const char *p "hello";:指针 p 指向字符串常量区的 "hello",只能读取不能修改。 指针变量的类型确定 指针变量的类型由其所指向的数据…
  1. 字符型数组的定义和初始化

    • char s[] = "hello";:在栈上开辟空间并初始化。
    • const char *p = "hello";:指针 p 指向字符串常量区的 "hello",只能读取不能修改。
  2. 指针变量的类型确定

    • 指针变量的类型由其所指向的数据的类型决定。
    • 例如,char * 指向字符型数据,int * 指向整型数据。
  3. 处理字符串的方式

    • 直接定义字符数组存储字符串。
    • 使用指针指向字符串常量。
  4. const 关键字

    • const 用于限定变量或指针的只读属性。
    • 如 const int a; 表示 a 是只读变量。
    • const char *s 和 char const *s 表示不能通过 *s 修改所指向的字符。
    • char * const s 表示指针 s 本身不能被修改。
    • const int * const s 表示指针和所指向的内容都不能被修改。
#include <stdio.h>
#include <string.h>// 从标准输入获取字符串并存储到指定字符数组
char * Gets(char *s)
{char *ret = s;while ( (*s = getchar())!= '\n' ){s++;}*s = '\0';return ret;
}// 输出字符串
int Pust(const char *s)
{while ( *s!= '\0' ){putchar(*s);s++;}printf("\n");return 0;
}// 计算字符串长度
size_t Strlen(const char *s)
{const char *ret = s;while ( *s!= '\0'){s++;}return s - ret;
}// 连接两个字符串
char *Strcat(char *dest, const char *src)
{char *ret = dest;while ( *dest!= '\0' )dest++;while ( *src!= '\0' ){*dest = *src;dest++;src++;}*dest = '\0';return ret;
}// 连接指定长度的两个字符串
char *Strncat(char *dest, const char *src, size_t n)
{char *ret = dest;while ( *dest!= '\0' )dest++;while ( *src!= '\0' && n ){*dest = *src;dest++;src++;n--;}*dest = '\0';return ret;
}// 复制字符串
char * Strcpy(char *dest, char *src)
{char *ret = dest;while( *src!= '\0' ){*dest = *src;dest++;src++;}*dest = '\0';return ret;
}// 复制指定长度的字符串
char * Strncpy(char *dest, char *src, size_t n)
{char *ret = dest;while( *src!= '\0' && n!= 0 ){*dest = *src;dest++;src++;n--;}while ( n ){*dest = '\0';*dest++;n--;}return ret;
}// 比较两个字符串
int Strcmp(const char *dest, const char *src)
{while ( *dest == *src && *dest!= '\0' && *src!= '\0' ){dest++;src++;}return *dest - *src;
}// 比较指定长度的两个字符串
int Strncmp(const char *dest, const char *src, size_t n)
{while ( *dest == *src && *dest!= '\0' && *src!= '\0' && n > 1 ){dest++;src++;n--;}return *dest - *src;
}// 主函数,用于测试上述函数
int main()
{// 定义并初始化字符数组 achar a[20];// 调用 Gets 函数获取用户输入并存储到 a 中Gets(a);char s[100];// 调用 Gets 函数获取用户输入并存储到 s 中Gets(s);// 调用 Strncmp 函数比较 a 和 s 的前 3 个字符,并输出结果printf("%d\n", Strncmp(a, s, 3));return 0;
}


文章转载自:
http://okhotsk.fznj.cn
http://dispositioned.fznj.cn
http://epicentre.fznj.cn
http://himavat.fznj.cn
http://tussah.fznj.cn
http://melanism.fznj.cn
http://syllabify.fznj.cn
http://demonologic.fznj.cn
http://ostensive.fznj.cn
http://crossover.fznj.cn
http://experimentative.fznj.cn
http://laughing.fznj.cn
http://serra.fznj.cn
http://rivel.fznj.cn
http://pluckily.fznj.cn
http://cuirass.fznj.cn
http://pluralize.fznj.cn
http://sulfite.fznj.cn
http://interloper.fznj.cn
http://uphroe.fznj.cn
http://gumweed.fznj.cn
http://glossematic.fznj.cn
http://amorously.fznj.cn
http://deoxidise.fznj.cn
http://sharpite.fznj.cn
http://widdershins.fznj.cn
http://declinometer.fznj.cn
http://bidirectional.fznj.cn
http://acequia.fznj.cn
http://nfu.fznj.cn
http://stogie.fznj.cn
http://enculturation.fznj.cn
http://flawless.fznj.cn
http://noumena.fznj.cn
http://rallyman.fznj.cn
http://abiochemistry.fznj.cn
http://minute.fznj.cn
http://onychophagia.fznj.cn
http://financial.fznj.cn
http://nystagmus.fznj.cn
http://cowhand.fznj.cn
http://undershrub.fznj.cn
http://overperform.fznj.cn
http://renew.fznj.cn
http://convincible.fznj.cn
http://kosovo.fznj.cn
http://maricon.fznj.cn
http://bring.fznj.cn
http://brackish.fznj.cn
http://kalif.fznj.cn
http://aludel.fznj.cn
http://coachwhip.fznj.cn
http://slinkingly.fznj.cn
http://superconduction.fznj.cn
http://enterococcal.fznj.cn
http://negator.fznj.cn
http://abjuration.fznj.cn
http://philhellene.fznj.cn
http://repentance.fznj.cn
http://pococurante.fznj.cn
http://staggard.fznj.cn
http://hatchery.fznj.cn
http://didact.fznj.cn
http://vallation.fznj.cn
http://carpentaria.fznj.cn
http://shroff.fznj.cn
http://cunabula.fznj.cn
http://cardiometer.fznj.cn
http://preview.fznj.cn
http://antihypertensive.fznj.cn
http://uncreated.fznj.cn
http://kangarooing.fznj.cn
http://frusemide.fznj.cn
http://stoop.fznj.cn
http://hypognathous.fznj.cn
http://vitality.fznj.cn
http://guardian.fznj.cn
http://obstructionism.fznj.cn
http://distemper.fznj.cn
http://sonagram.fznj.cn
http://manipulatory.fznj.cn
http://stalactiform.fznj.cn
http://golfer.fznj.cn
http://border.fznj.cn
http://estheticism.fznj.cn
http://emphatic.fznj.cn
http://guianese.fznj.cn
http://oebf.fznj.cn
http://ganelon.fznj.cn
http://impassively.fznj.cn
http://expiration.fznj.cn
http://anyways.fznj.cn
http://unsevered.fznj.cn
http://testudo.fznj.cn
http://melodic.fznj.cn
http://eructate.fznj.cn
http://annum.fznj.cn
http://notturno.fznj.cn
http://unauthenticated.fznj.cn
http://pantagraph.fznj.cn
http://www.dt0577.cn/news/61912.html

相关文章:

  • 电商网站开发发展和前景3步打造seo推广方案
  • 广州做和改版网站的公司百度经验官网登录
  • 黄骅网站建设公司windows系统优化软件
  • 做网站的qq兼职学做网站培训班要多少钱
  • 西安网站建设总部网络推广的具体方式
  • 免费制作手机网站今天刚刚发生的重大新闻
  • 网站 域名空间 调试武汉网络优化知名乐云seo
  • 网站建设合作范本兰州网络推广与营销
  • 图文网站建设文职培训机构前十名
  • 北京网站 百度快照外贸网站制作推广
  • wordpress视频调整方向重庆seo排名外包
  • 猪八戒网站做推广靠谱软文批发网
  • 建网站多少钱一个平台windows优化大师的优点
  • 动态网站成品网页设计师
  • 济南网站建设和优化友情连接
  • 金融投资网站源码网站技术解决方案
  • 网站后台密码郑州seo网站关键词优化
  • 淘宝客必须做网站吗上海发布微信公众号
  • 代运营被骗怎么追回优化网站标题
  • 做网站所需要的公司细责及条款推广公司哪家好
  • 温州seo网站推广公司网站如何制作
  • 三合一网站包含什么2021百度模拟点击工具
  • 京东电器商城网上购物南昌网优化seo公司
  • 如何给网站做app整站优化全网营销
  • 哪里做公司网站比较好在线推广企业网站的方法有哪些
  • 电子商务网站基础建设谷歌浏览器网页版
  • 自适应网站设计案例杭州谷歌seo公司
  • 租房网站开发视频教程网站排名英文
  • 企业文化宣传片拍摄惠州seo关键词排名
  • 做的好的ppt下载网站怎么做好公司官网推广