当前位置:网站首页>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:

边栏推荐
猜你喜欢

TL431的基本特性以及振荡电路

技术解析|如何将 Pulsar 数据快速且无缝接入 Apache Doris

系统设计.如何设计一个秒杀系统(完整版 转)

drools从下载到postman请求成功

Learn iframes and use them to solve cross-domain problems

new Date converts strings into date formats Compatible with IE, how ie8 converts strings into date formats through new Date, how to replace strings in js, and explain the replace() method in detail

什么是数字孪生智慧城市应用场景

2千兆光+6千兆电导轨式网管型工业级以太网交换机支持X-Ring冗余环网一键环网交换机

Eight guiding principles to help businesses achieve digital transformation success

2003. 每棵子树内缺失的最小基因值 DFS
随机推荐
8.Haproxy 搭建Web集群
7.LVS负载均衡群集之原理叙述
技术解析|如何将 Pulsar 数据快速且无缝接入 Apache Doris
元宇宙“吹鼓手”Unity:疯狂扩局,悬念犹存
MRS: Introduction to the use of Alluxio
一文详解DHCP原理及配置
基本表单验证流程
用户与用户互发红包/支付宝C2C/B2C现金红包php源码示例/H5方式/兼容苹果/安卓
new Date converts strings into date formats Compatible with IE, how ie8 converts strings into date formats through new Date, how to replace strings in js, and explain the replace() method in detail
8. Haproxy builds a web cluster
pnpm 是凭什么对 npm 和 yarn 降维打击的
SQL injection in #, - +, - % 20, % 23 is what mean?
解决问题遇到的问题
The general SQL injection flow (sample attached)
SQL query String field less than 10 how to check
小程序 + 电商,玩转新零售
网络工程师入门必懂华为认证体系,附系统学习路线分享
manipulation of file contents
JVM Notes
7-1 LVS+NAT load balancing cluster, NAT mode deployment