It should check its argument is indeed the opcode of an LSR instruction and return -1 if it is not.
Work out what the program does.
0xe000 0xe081 0x2fa0 0xe7f0 0xe0e0 0x9509 0xe011 0x0f01 0xe01a 0x1b10 0xf7b1 0xe080 0xe7f0 0xe0e0 0x9509
You can assume there at most 100 words on the line and no word is more than 10 characters long.
Note, a single customer may have multiple bank accounts, so an array is needed to holds the amount of money in each account.
enum {
MAX_ACCOUNTS = 5,
N_CUSTOMERS = 1000
};
struct customer {
char name[20];
int numberOfAccounts;
double balance[MAX_ACCOUNTS];
};
struct customer customers[N_CUSTOMERS];
One day, around Christmas, the manager asks you who is the customer with the largest balance in a single account, so that he can send them a nice Christmas card (ok, suspend disbelief). Write a piece of C code that will print the name of the relevant customer.