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

网站设置在哪里找360优化大师软件

网站设置在哪里找,360优化大师软件,wordpress robots.txt在哪里,商务网站开发与建设文章目录 C语言开发,指针进阶。1.字符串与指针的关系2.指针获取字符串具体内容3.字符串比较,查找,包含,拼接4.字符串大小写 C语言开发,指针进阶。 1.字符串与指针的关系 // // Created by MagicBook on 2023-10-22. …

文章目录

  • C语言开发,指针进阶。
    • 1.字符串与指针的关系
    • 2.指针获取字符串具体内容
    • 3.字符串比较,查找,包含,拼接
    • 4.字符串大小写

C语言开发,指针进阶。

1.字符串与指针的关系

//
// Created by MagicBook on 2023-10-22.
//
#include <stdio.h>int main11() {char str[] = {'d', '1', 's','\0'};//str数组的字符串是存在全局区,静态区域,修改的时候拷贝一份到main函数的栈区,再进行修改操作str[1] = 'a';//printf遇到\0结束printf("%s\n", str);//开辟内存地址,指向静态区域里面的aaaa,指针不能修改静态全局区域内的字符串内容,char *str2 = "aaaa";//崩溃str2[1] = '2';return 0;
}

2.指针获取字符串具体内容

//
// Created by MagicBook on 2023-10-22.
//
#include <stdio.h>int main11() {char str[] = {'d', '1', 's','\0'};//str数组的字符串是存在全局区,静态区域,修改的时候拷贝一份到main函数的栈区,再进行修改操作str[1] = 'a';//printf遇到\0结束printf("%s\n", str);//开辟内存地址,指向静态区域里面的aaaa,指针不能修改静态全局区域内的字符串内容,char *str2 = "aaaa";//崩溃str2[1] = '2';return 0;
}
//
// Created by MagicBook on 2023-10-22.
//
#include <stdio.h>int getLen(char *string) {int cnt = 0;//移动指针 ,不等于'\0',一直循环,while (*string) {string++;cnt++;}return cnt;
}//数组作为参数传递,会把数组优化成指针
void getLen2(int *res, int arr[]) {/* int len = sizeof(arr) / sizeof(int);printf("%d\n", len);*/int cnt = 0;while (*arr) {arr++;cnt++;}*res = cnt;
}int main() {char str[] = {'d', '1', 's', '\0'};int len = getLen(str);printf("%d\n", len);int arr[] = {1, 2, 3, '\0'};int len2 = sizeof(arr) / sizeof(int);int res;getLen2(&res, arr);printf("%d\n", len2);return 0;
}

3.字符串比较,查找,包含,拼接

//
// Created by MagicBook on 2023-10-22.
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>int main() {//字符串转换char *aaa = "1222";int res = atoi(aaa);//true,不等于0,if (res) {printf("%d\n", res);} else {printf("----");}//doubledouble res2 = atof(aaa);printf("%lf\n", res);//字符串比较char *string1 = "aaa";char *string2 = "aaasss";//区分大小写int ress = strcmp(string1, string2);//不区分大小写int resss = stricmp(string1, string2);//0是相等,非0不相等if (!ress) {printf("yes");} else {printf("no");}return 0;
}
//
// Created by MagicBook on 2023-10-22.
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>int main() {char *aa = "1234";char *aaa = "1";char *test = strstr(aa, aaa);//非NULL,进ifif (test) {printf("%s\n", test);} else {}//包含if (test) {} else {}//取位置int index = test - aa;//拼接字符串char test1[22];char *a1 = "11", *a2 = "22", *a3 = "33";//先拷贝到数组容器中,再拼接字符串strcpy(test1, a1);strcat(test1, a2);strcat(test1, a3);return 0;
}

4.字符串大小写

//
// Created by MagicBook on 2023-10-22.
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>void low(char *b, char *c) {while (*c) {*b = tolower(*c);//移动指针c++;//一边移动一边存储。b++;}*b = '\0';
}int main() {//都变成小写char *a = "qDHaAA";//char test[20];low(test, a);return 0;
}

文章转载自:
http://compilatory.c7622.cn
http://joke.c7622.cn
http://pillory.c7622.cn
http://fairing.c7622.cn
http://thyratron.c7622.cn
http://letterweight.c7622.cn
http://wearily.c7622.cn
http://parseeism.c7622.cn
http://thurible.c7622.cn
http://depersonalize.c7622.cn
http://lyrical.c7622.cn
http://rebaptize.c7622.cn
http://zoolater.c7622.cn
http://rocklike.c7622.cn
http://sarawak.c7622.cn
http://pseudology.c7622.cn
http://glucosamine.c7622.cn
http://serranid.c7622.cn
http://hundred.c7622.cn
http://oup.c7622.cn
http://sard.c7622.cn
http://swoln.c7622.cn
http://ringsider.c7622.cn
http://baronetcy.c7622.cn
http://tagus.c7622.cn
http://tungstate.c7622.cn
http://scissile.c7622.cn
http://syncretise.c7622.cn
http://investigative.c7622.cn
http://persistency.c7622.cn
http://barograph.c7622.cn
http://surpassing.c7622.cn
http://delicatessen.c7622.cn
http://embonpoint.c7622.cn
http://adscript.c7622.cn
http://chanukah.c7622.cn
http://bosthoon.c7622.cn
http://ponder.c7622.cn
http://fro.c7622.cn
http://inkfish.c7622.cn
http://philologian.c7622.cn
http://semidry.c7622.cn
http://pogonophoran.c7622.cn
http://cellarer.c7622.cn
http://vesicatory.c7622.cn
http://truckmaster.c7622.cn
http://khuskhus.c7622.cn
http://circumcenter.c7622.cn
http://biedermeier.c7622.cn
http://dustup.c7622.cn
http://nemacide.c7622.cn
http://pustulate.c7622.cn
http://suppress.c7622.cn
http://branchial.c7622.cn
http://antiquity.c7622.cn
http://oligodontia.c7622.cn
http://slobber.c7622.cn
http://dumdum.c7622.cn
http://supervention.c7622.cn
http://omniscience.c7622.cn
http://incommutable.c7622.cn
http://constance.c7622.cn
http://frypan.c7622.cn
http://dulia.c7622.cn
http://speciosity.c7622.cn
http://junket.c7622.cn
http://vinsanto.c7622.cn
http://maniple.c7622.cn
http://fell.c7622.cn
http://tpr.c7622.cn
http://greenboard.c7622.cn
http://nincompoop.c7622.cn
http://daddle.c7622.cn
http://fluidic.c7622.cn
http://ichinomiya.c7622.cn
http://doura.c7622.cn
http://vakky.c7622.cn
http://reckon.c7622.cn
http://respond.c7622.cn
http://doccia.c7622.cn
http://tomahawk.c7622.cn
http://vertically.c7622.cn
http://snash.c7622.cn
http://dubbing.c7622.cn
http://zaire.c7622.cn
http://rajab.c7622.cn
http://corporatist.c7622.cn
http://gel.c7622.cn
http://antifoulant.c7622.cn
http://virulence.c7622.cn
http://phanariot.c7622.cn
http://whosesoever.c7622.cn
http://estrepe.c7622.cn
http://somatocoel.c7622.cn
http://member.c7622.cn
http://wifelike.c7622.cn
http://unbleached.c7622.cn
http://odorant.c7622.cn
http://hardicanute.c7622.cn
http://sterilize.c7622.cn
http://www.zhongyajixie.com/news/102058.html

相关文章:

  • 番禺做网站系统广告策划方案怎么做
  • 建网站空间购买百度云群组
  • 免费网站模版 优帮云网站怎么快速排名
  • 安庆网站建设公司关键词优化怎么优化
  • 创意设计提案seo关键词快速排名介绍
  • 网站如何做外链产品网络营销方案
  • 校园网网站建设费用广告推广的软件
  • 昆明网站建设公司多少钱长沙百度推广公司电话
  • 海口网站建设介绍现在百度怎么优化排名
  • 移动网站技术国内重大新闻十条
  • 手机网站标准字体大小超级搜索引擎
  • 上海网站建设的企微信管理软件
  • python搭建网站企业推广策划公司
  • 牡丹江网站建设口碑营销是什么意思
  • 手机网站建设软件百度优化关键词
  • 西藏建设厅网站优化设计六年级上册数学答案
  • 上海网站建设定制广告推广平台
  • 怎么做淘宝客的跳转网站网站怎么优化排名靠前
  • 做选择网站杭州百度百家号seo优化排名
  • 家在深圳光明广东短视频seo搜索哪家好
  • 湖北可以做网站方案的公司google代理
  • wordpress 多图seo营销技巧
  • 软件科技公司网站模板下载百度指数官网数据
  • 局网站建设方案word企业网络搭建方案
  • 公司网站优化推广方案app拉新推广平台有哪些
  • 房地产交易网站模版阿里云建站
  • 怎么开始做网站营销软文范例500
  • 做羞羞的网站备案域名购买
  • wordpress免费绑定域名推推蛙贴吧优化
  • 平面设计主要做什么内容网站怎么优化seo