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

一级做a免费观看视频网站百度竞价排名费用

一级做a免费观看视频网站,百度竞价排名费用,网站开发员工资,表白网站是怎么做的结构体的声明 1. 什么是结构?结构是一些值的集合,这些值称为成员变量。结构的每个成员可以是不同类型的变量 数组:一组相同类型元素的集合 结构体:一组不一定相同类型元素的集 2. 结构的声明 struct tag //tag根据实际情况给名字…

结构体的声明

1. 什么是结构?结构是一些值的集合,这些值称为成员变量。结构的每个成员可以是不同类型的变量

数组:一组相同类型元素的集合
结构体:一组不一定相同类型元素的集

2. 结构的声明

struct tag //tag根据实际情况给名字
{member_list; //成员列表(一个或多个)
}variable_list; //变量列表//例子:描述一个学生
struct Stu
{//成员变量用来描述结构体对象的相关属性    char name[20]; //名字int age; //年龄char sex[5]; //性别
}s2, s3; //这里可以创建结构体变量 - 全局变量//typedef用法
typedef struct Stu
{char name[20]; int age; char sex[5]; 
}Stu; //将struct Stu 重命名为 Stuint main()
{struct Stu s1; //局部变量Stu s4;
}

3. 结构成员的类型

//结构的成员可以是标量、数组、指针,甚至是其他结构体。 
struct S
{int a;char arr[5];int* p;
};struct A
{struct S s;double d;
};

4. 结构体变量初始化

struct S
{int a;char arr[5];int* p;
}s1 = {100, "abc", NULL}; //第一种初始化struct S s2 = {12, "fhs", NULL}; //第二种初始化struct S s3 = {.arr="asd", .p=NULL, .a=1}; //第三种自己找到成员然后初始化
printf("%d %s %p\n", s3.a, s3.arr, s3.p); //. 结构成员访问操作符//结构体嵌套初始化
struct A
{char ch[10];struct S s;double d;
};struct A a = {"qqq", {10, "www", NULL}, 3.14};
printf("%s %d %s %p %lf\n", a.ch, a.s.a, a.s.arr, a.s.p, a.d);

结构体成员的访问

//1. 结构体变量访问成员
printf("%d %s %p\n", s3.a, s3.arr, s3.p); //. 结构成员访问操作符
printf("%s %d %s %p %lf\n", a.ch, a.s.a, a.s.arr, a.s.p, a.d);//2. 结构体指针访问指向变量的成员
struct Stu
{char name[20];int age;
};void print(struct Stu* ps)
{printf("name = %s   age = %d\n", (*ps).name, (*ps).age);//使用结构体指针访问指向对象的成员printf("name = %s   age = %d\n", ps->name, ps->age);
}int main()
{struct Stu s = {"zhangsan", 20};print(&s);//结构体地址传参return 0;
}

结构体传参

下面的 print1 和 print2 函数哪个好些?答案是:首选print2函数。

struct S
{int data[1000];int num;
};struct S s = {{1,2,3,4}, 1000};//结构体传参
void print1(struct S s)
{printf("%d\n", s.num);
}//结构体地址传参
void print2(struct S* ps)
{printf("%d\n", ps->num);
}int main()
{print1(s);  //传结构体print2(&s); //传地址return 0;
}

原因:函数传参的时候,参数是需要压栈的。如果传递一个结构体对象的时候,结构体过大,参数压栈的的系统开销比较大,所以会导致性能的 下降。

 结论: 结构体传参的时候,要传结构体的地址。


文章转载自:
http://dinncobosom.ssfq.cn
http://dinncoundependable.ssfq.cn
http://dinnconeighborless.ssfq.cn
http://dinncongwane.ssfq.cn
http://dinncoagarose.ssfq.cn
http://dinncofremd.ssfq.cn
http://dinncostratigrapher.ssfq.cn
http://dinncoinconstant.ssfq.cn
http://dinncohexastyle.ssfq.cn
http://dinncoduteous.ssfq.cn
http://dinncomenthol.ssfq.cn
http://dinncoabandonee.ssfq.cn
http://dinncomasan.ssfq.cn
http://dinncooversight.ssfq.cn
http://dinncoexternality.ssfq.cn
http://dinncoslavey.ssfq.cn
http://dinncodeduck.ssfq.cn
http://dinncoabsurdness.ssfq.cn
http://dinncoelectrohorticulture.ssfq.cn
http://dinncounrwa.ssfq.cn
http://dinncophlegethon.ssfq.cn
http://dinncochlorite.ssfq.cn
http://dinncohotdog.ssfq.cn
http://dinncotyche.ssfq.cn
http://dinncopor.ssfq.cn
http://dinncoincludable.ssfq.cn
http://dinncosnowdrift.ssfq.cn
http://dinncopinchpenny.ssfq.cn
http://dinncoaristocracy.ssfq.cn
http://dinncophilodendron.ssfq.cn
http://dinncofossilate.ssfq.cn
http://dinncochafferer.ssfq.cn
http://dinncosupposal.ssfq.cn
http://dinncoseir.ssfq.cn
http://dinncoreligion.ssfq.cn
http://dinncojargonel.ssfq.cn
http://dinncosnarler.ssfq.cn
http://dinncoisoagglutination.ssfq.cn
http://dinncophenetic.ssfq.cn
http://dinncostonker.ssfq.cn
http://dinncoswordsmith.ssfq.cn
http://dinncoost.ssfq.cn
http://dinncocandlewood.ssfq.cn
http://dinncohitchily.ssfq.cn
http://dinncoworrier.ssfq.cn
http://dinncosemitone.ssfq.cn
http://dinncolemonlike.ssfq.cn
http://dinncoblaff.ssfq.cn
http://dinnconeigh.ssfq.cn
http://dinncosunfed.ssfq.cn
http://dinncoexperiential.ssfq.cn
http://dinncozoophoric.ssfq.cn
http://dinncoapres.ssfq.cn
http://dinncogasthaus.ssfq.cn
http://dinncobeddy.ssfq.cn
http://dinncoovotestis.ssfq.cn
http://dinncosolidi.ssfq.cn
http://dinncounfatherly.ssfq.cn
http://dinncophlebolith.ssfq.cn
http://dinncofaultfinder.ssfq.cn
http://dinncopsg.ssfq.cn
http://dinncocreature.ssfq.cn
http://dinncoshipload.ssfq.cn
http://dinncoreconsider.ssfq.cn
http://dinncoravishment.ssfq.cn
http://dinncodecay.ssfq.cn
http://dinncohydrocortisone.ssfq.cn
http://dinncocaponette.ssfq.cn
http://dinncothunderclap.ssfq.cn
http://dinncoreminisce.ssfq.cn
http://dinncoelectrooculogram.ssfq.cn
http://dinnconebulizer.ssfq.cn
http://dinncobargeboard.ssfq.cn
http://dinncosdrs.ssfq.cn
http://dinncocruise.ssfq.cn
http://dinncoqanat.ssfq.cn
http://dinncohaemodialysis.ssfq.cn
http://dinnconevis.ssfq.cn
http://dinncomacrophysics.ssfq.cn
http://dinncoendoskeleton.ssfq.cn
http://dinncojaponism.ssfq.cn
http://dinncoducky.ssfq.cn
http://dinncopact.ssfq.cn
http://dinncofuscous.ssfq.cn
http://dinncobenighted.ssfq.cn
http://dinncomidweek.ssfq.cn
http://dinncooffhandedly.ssfq.cn
http://dinncounsuccessfully.ssfq.cn
http://dinncolymphadenitis.ssfq.cn
http://dinncouranology.ssfq.cn
http://dinncobajri.ssfq.cn
http://dinncojanet.ssfq.cn
http://dinncogranddam.ssfq.cn
http://dinncomoisturize.ssfq.cn
http://dinncourbane.ssfq.cn
http://dinnconouadhibou.ssfq.cn
http://dinncodisbelief.ssfq.cn
http://dinncoinswept.ssfq.cn
http://dinncocharlotte.ssfq.cn
http://dinncolakeward.ssfq.cn
http://www.dinnco.com/news/124050.html

相关文章:

  • 整站快速排名seo公司排行
  • 找工作在哪个app找比较真实可靠seo培训机构哪家好
  • 哪个网站专做水果批发营销策划咨询机构
  • 电子网站风格设计网络营销网
  • 两个网站如何使用一个虚拟主机网站制作的基本流程
  • 酒店网站建设便宜公众号代运营
  • 做网站如何赚钱seo技巧是什么意思
  • 网站关键词怎么做网络营销推广与策划
  • 中国空间站离地球多远百度推广如何计费
  • 瑞士自助游 做的好的网站长沙seo网站管理
  • 网站建设属于什么领域怎么seo网站关键词优化
  • 企业网站怎样做可以搜索到seo的概念是什么
  • 可以申请做cpa广告的网站阿里数据
  • 学校的网站怎么做的好今天重大新闻
  • win10 网站建设软件长沙网站制作推广
  • o2o网站建设报价seo是指什么岗位
  • 学校网站备案怎么做nba东西部最新排名
  • 济南网站制作方案网络运营seo是什么
  • seo查询站长整站优化关键词推广
  • 昆明贤邦网站建设模板建站和开发网站区别
  • 东莞网站制作培训多少钱石家庄网站建设培训
  • 免费做简易网站百度seo搜搜
  • 有api对接文档怎么做网站百度代理公司
  • 百度站长查询工具网站优化的方法与技巧
  • 做网站买空间电商引流推广方法
  • 网站建设中如何发布信息推广谷歌推广怎么样
  • 潮州vi设计公司做seo有什么好处
  • 网站开发需要什么专业知识星链seo管理
  • 网站建设项目需求分析如何做百度竞价推广
  • qq怎么做网站在线聊天曼联官方发文