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

边栏推荐
- 4-way two-way HDMI integrated business high-definition video optical transceiver 8-way HDMI high-definition video optical transceiver
- 什么是数字孪生智慧城市应用场景
- Introduction to the memory model of the JVM
- How class only static allocation and dynamic allocation
- 七夕节,我用代码制作了表白信封
- 机器学习之视频学习【更新】
- SQL interview Questions
- MySQL Query Exercise (1)
- 【21天学习挑战赛】直接插入排序
- 大型连锁百货运维审计用什么软件好?有哪些功能?
猜你喜欢

y86.第四章 Prometheus大厂监控体系及实战 -- prometheus存储(十七)

Hey, I had another fight with HR in the small group!

仿牛客论坛项目梳理

机器学习之视频学习【更新】

Simple operation of the file system

Significant differences between Oracle and Postgresql in PLSQL transaction rollback

7-3 LVS+Keepalived集群叙述与部署

Postgresql source code (66) insert on conflict grammar introduction and kernel execution process analysis

JVM Notes

劝退背后。
随机推荐
基地址:环境变量
PHP高级开发案例(1):使用MYSQL语句跨表查询无法导出全部记录的解决方案
复现20字符短域名绕过
7-2 LVS+DR Overview and Deployment
本周四晚19:00知识赋能第4期直播丨OpenHarmony智能家居项目之设备控制实现
10 Convolutional Neural Networks for Deep Learning 3
2.15 keil使用电脑端时间日期
6口全千兆二层网管型工业以太网交换机千兆2光4电光纤自愈ERPS环网交换机
目标检测-中篇
千兆2光8电管理型工业以太网交换机WEB管理X-Ring一键环网交换机
MRS: Introduction to the use of Alluxio
JVM Notes
杭电多校-Slipper-(树图转化+虚点建图)
如何简化现代电子采购的自动化?
y86.第四章 Prometheus大厂监控体系及实战 -- prometheus存储(十七)
学会iframe并用其解决跨域问题
Mobile payment online and offline payment scenarios
42. 接雨水
2千兆光+6千兆电导轨式网管型工业级以太网交换机支持X-Ring冗余环网一键环网交换机
7-2 LVS+DR概述与部署