当前位置:网站首页>Structure function exercise
Structure function exercise
2022-08-04 04:15:00 【BSP Junior Primary School Monk】
1. Write a program to complete the function of querying grades according to the student's name (requires the query to be implemented through a function),
Define a student structure, including name, grade, define a structure array, save all the students' results
Information (assuming there are 3 students), first enter the student information, and then call the query function to obtain the student's grades to be queried
/*3. Write a program to complete the function of querying the results according to the student's name (requires the query to be implemented through a function),Define a student structure, including name, grade, define a structure array, save all studentsInformation (assuming there are 3 students), first enter the student information, and then call the query function to obtain the student's grades to be queried*/#include #include #include typedef struct{char name[10];float score;}STU;void struct_input(STU arr[],int n){for(int i=0;i
Run result:
2. Implement addition, deletion, modification, and query operations on a structure array
#include #include #include typedef struct{int num;char name[20];char sex;float score;}boy;boy boy_test[6]={{101,"li ping",'m',45},{102,"zhang ping",'m',62.5},{103,"he feng",'m',92.5},{104,"cheng li",'f',87},{106,"wang ming",'m',58},};void struct_print(boy *p01,int n){printf("\n");printf("Student ID\tName\tGender\tScore\n");for(int i=0;i
Run result:
边栏推荐
- docker安装mysql与宿主机相差8小时的问题。
- Mockito unit testing
- 系统设计.如何设计一个秒杀系统(完整版 转)
- 帮助企业实现数字化转型成功的八项指导原则
- MySQL Query Exercise (1)
- Implementing a server-side message active push solution based on SSE
- Postgresql源码(66)insert on conflict语法介绍与内核执行流程解析
- 7-1 LVS+NAT 负载均衡群集,NAT模式部署
- 7-3 LVS+Keepalived集群叙述与部署
- 【 observe 】 super fusion: the first mention of "calculate net nine order" evaluation model, build open prosperity of power network
猜你喜欢
A Preliminary Study of RSS Subscription to WeChat Official Account-feed43
Learn iframes and use them to solve cross-domain problems
Take care of JVM performance optimization (own note version)
Reproduce 20-character short domain name bypass
8.Haproxy 搭建Web集群
Polygon zkEVM network node
自定义通用分页标签01
烧录场景下开发如何进行源代码保密工作
外卖店优先级
PL/SQL Some Advanced Fundamental
随机推荐
4-way two-way HDMI integrated business high-definition video optical transceiver 8-way HDMI high-definition video optical transceiver
类如何只能静态分配和只能动态分配
函数,递归以及dom简单操作
XSS related knowledge points
JVM笔记
pnpm 是凭什么对 npm 和 yarn 降维打击的
Hey, I had another fight with HR in the small group!
MySQL Query Exercise (1)
张量篇-应用案例
Take care of JVM performance optimization (own note version)
学会iframe并用其解决跨域问题
2003. 每棵子树内缺失的最小基因值 DFS
Implementing a server-side message active push solution based on SSE
小程序 + 电商,玩转新零售
出现504怎么办?由于服务器更新导致的博客报504错误[详细记录]
2022支付宝C2C现金红包PHP源码DEMO/兼容苹果/安卓浏览器和扫码形式
Enterprise live broadcast is on the rise: Witnessing focused products, micro-like embracing ecology
The video of machine learning to learn [update]
Mockito单元测试
杭电多校-Slipper-(树图转化+虚点建图)