当前位置:网站首页>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:
边栏推荐
- 基本表单验证流程
- How to open a CITIC Securities online account?is it safe?
- 软件测试如何系统规划学习呢?
- 8. Haproxy builds a web cluster
- 解决问题遇到的问题
- 自定义通用分页标签01
- 【 observe 】 super fusion: the first mention of "calculate net nine order" evaluation model, build open prosperity of power network
- Mobile payment online and offline payment scenarios
- 七夕节,我用代码制作了表白信封
- Postgresql source code (66) insert on conflict grammar introduction and kernel execution process analysis
猜你喜欢
随机推荐
Mobile payment online and offline payment scenarios
2022支付宝C2C现金红包PHP源码DEMO/兼容苹果/安卓浏览器和扫码形式
数组相关 内容 解析
缓存穿透、缓存击穿、缓存雪崩以及解决方案
【机器学习】21天挑战赛学习笔记(一)
初识Numpy
Reproduce 20-character short domain name bypass
The Shell function
自定义通用分页标签02
Jenkins 导出、导入 Job Pipeline
类如何只能静态分配和只能动态分配
Hey, I had another fight with HR in the small group!
技术解析|如何将 Pulsar 数据快速且无缝接入 Apache Doris
文件系统的简单操作
Metaverse "Drummer" Unity: Crazy expansion, suspense still exists
42. 接雨水
【 observe 】 super fusion: the first mention of "calculate net nine order" evaluation model, build open prosperity of power network
企业直播风起:目睹聚焦产品,微赞拥抱生态
使用serve搭建本地服务器
八年软件测试工程师带你了解-测试岗进阶之路