Student All Funcions
Student All Funcions
h>
#include <stdlib.h>
#include <string.h> // Added to use strcmp
int main() {
int n, rn;
char name[30];
printf("Enter the number of students\n");
scanf("%d", &n);
read(s, n);
display(s, n);
VarunFinchi is a manger of BCR franchise team, where he has to select 5 players to make
squad full for playing in PPL League. He contacts Lord Hassan is an analyst of BCR team,
where he has all the player details. Varun Finchi selects 3 players who have highest runs in
their career, one who has least runs in his career and one more player who has Name
“Rajat”. Please help Varun Finchi to select players for BCR team.
2. Algorithm:
Algorithm: To read Player Details
Step 1: Start
Step 2: Repeat for n number of players’ details
Read player_name, team_name, odi_rank, runs and centuries.
Step 3: Stop
Program:
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
char p_name[20], t_name[10];
int runs;
} TEAM;
int main() {
int n;
printf("Enter number of players: ");
scanf("%d", &n);
read(bcr, n);
display(bcr, n);
sort_desc(bcr, n);
Home task
1 PhonePay is an application for money transition online. The application stores ‘n’
transaction details of users. As every user is very much interested to know his transaction
details, write a program to display transactions performed by a user and transaction details
of a particular transaction. Given: Transaction_ID, User_ID, Amount, Beneficiary_ID
2 Blockchain is the new technology in computer science, where it is used to store the ‘n’
transaction details of users. Shivam is very much interested in implementing blockchain
kind of technology using C programming. Transaction details contains: Transaction_ID,
sender name, receiver name, amount, time. Please help Shivam to implement the above
problem and perform the below operations. i) Display the transaction details of particular
Transaction_ID. ii) Display the transaction details of particular user.
3 Vishal owns a cyber café, where he has ‘N’ number of computers. Since Vishal is lazy to
write the details of ‘N’ computers in paper, he stores the details of computers in a file.
Please help Vishal to store the details of computers and perform the below operations. i)
Display the details of all computers ii) Display only “HP” computers.