当前位置:网站首页>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:
边栏推荐
猜你喜欢
基本表单验证流程
深度学习之 10 卷积神经网络3
打造一份优雅的简历
机器学习之视频学习【更新】
Deep learning -- CNN clothing image classification, for example, discussed how to evaluate neural network model
张量篇-应用案例
SQL injection in #, - +, - % 20, % 23 is what mean?
manipulation of file contents
基于 SSE 实现服务端消息主动推送解决方案
Take care of JVM performance optimization (own note version)
随机推荐
Basic characteristics of TL431 and oscillator circuit
用户与用户互发红包/支付宝C2C/B2C现金红包php源码示例/H5方式/兼容苹果/安卓
仿牛客论坛项目梳理
MySQL query optimization and tuning
SQL interview Questions
Gigabit 2 X light 8 electricity management industrial Ethernet switches WEB management - a key Ring Ring net switch
元宇宙“吹鼓手”Unity:疯狂扩局,悬念犹存
拿捏JVM性能优化(自己笔记版本)
什么是数字孪生智慧城市应用场景
Use serve to build a local server
将xml标签转换为txt(voc格式转换为yolo方便进行训练)
7-1 LVS+NAT load balancing cluster, NAT mode deployment
Explain详解与实践
PHP高级开发案例(1):使用MYSQL语句跨表查询无法导出全部记录的解决方案
Simple operation of the file system
[Medical Insurance Science] To maintain the safety of medical insurance funds, we can do this
中信证券网上开户怎么开的?安全吗?
How class only static allocation and dynamic allocation
怎么把elastic中的异常登录ip和日志自动导出或抓取到数据库中?
7-2 LVS+DR Overview and Deployment