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

边栏推荐
- 【 observe 】 super fusion: the first mention of "calculate net nine order" evaluation model, build open prosperity of power network
- mq应用场景介绍
- 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
- 6-port full Gigabit Layer 2 network managed industrial Ethernet switch Gigabit 2 optical 4 electrical fiber self-healing ERPS ring network switch
- Stop behind.
- Jenkins 导出、导入 Job Pipeline
- Deep learning -- CNN clothing image classification, for example, discussed how to evaluate neural network model
- 用户与用户互发红包/支付宝C2C/B2C现金红包php源码示例/H5方式/兼容苹果/安卓
- 哎,又跟HR在小群吵了一架!
- 一文详解DHCP原理及配置
猜你喜欢

7-2 LVS+DR概述与部署

【 observe 】 super fusion: the first mention of "calculate net nine order" evaluation model, build open prosperity of power network
![[Medical Insurance Science] To maintain the safety of medical insurance funds, we can do this](/img/d0/6ac51d0d51c907ed0e1578e038fffd.jpg)
[Medical Insurance Science] To maintain the safety of medical insurance funds, we can do this

base address: environment variable

Shell 函数
2022年软件测试——精选金融银行面试真题

This Thursday evening at 19:00, the fourth live broadcast of knowledge empowerment丨The realization of equipment control of OpenHarmony smart home project

sql语句查询String类型字段小于10的怎么查

The Shell function

用户与用户互发红包/支付宝C2C/B2C现金红包php源码示例/H5方式/兼容苹果/安卓
随机推荐
目标检测-中篇
本周四晚19:00知识赋能第4期直播丨OpenHarmony智能家居项目之设备控制实现
typescript type 和 interface 的区别
八年软件测试工程师带你了解-测试岗进阶之路
7. The principle description of LVS load balancing cluster
7.LVS负载均衡群集之原理叙述
一文详解DHCP原理及配置
基地址:环境变量
基本表单验证流程
Introduction to the memory model of the JVM
转:管理是对可能性的热爱,管理者要有闯进未知的勇气
杭电多校-Slipper-(树图转化+虚点建图)
MySQL query optimization and tuning
【C语言进阶】程序环境和预处理
unity框架之缓存池
力扣(LeetCode)215. 数组中的第K个最大元素(2022.08.03)
The general SQL injection flow (sample attached)
7-2 LVS+DR Overview and Deployment
mq应用场景介绍
张量篇-应用案例