C Assignment
C Assignment
SUBMITTEB
BY
USN : Dip08 NAME: HARISHA PATIL
SUBMIITED
TO
Ms Jaishma Kumari B
Assistant Professor
#include <stdio.h>
#include <string.h>
struct account {
};
struct account initAcc(char* name, char* type, char* branch, char* number,
unsigned int balance) {
strcpy(newAc.holder, name);
strcpy(newAc.branch, branch);
strcpy(newAc.type, type);
} else {
if (strlen(number) == 10) {
strcpy(newAc.no, number);
} else {
// Set balance
newAc.bal = balance;
if (!isErr) {
return newAc;
} else {
return emptyAc;
}
// Function to find the account with the maximum balance
if (size == 0) {
return emptyAc;
int maxBalIndex = 0;
maxBalIndex = i;
return src[maxBalIndex];
}
// Example usage
int main() {
// Display result
} else {
printf("No valid account found.\n");
return 0;