Question: Using C programming, In the file 'CUSTOMER.DAT' there are 1 0 records with the following structure:In another file 'TRANSACTIONS.DAT' there are several records with the
Using C programming, In the file 'CUSTOMER.DAT' there are records with the following structure:In another file 'TRANSACTIONS.DAT' there are several records with the following structure:struct transint accno; char transtype ; float amount;;
The element transtype contains DW indicating deposit or withdrawal of amount. Write a program to update 'CUSTOMER.DAT' file, ie if the transtype is then update the balance of 'CUSTOMER.DAT' by adding amount to balance for the corresponding accno. Similarly, if transtype is W then subtract the amount from balance. However, while subtracting the amount ensure that the amount should not get overdrawn, ie at least $ should remain in the account. Use the data as shown in following tables
Points:
tableCUSTOMERDATAccount#Name,Balance in USDTim Cook,Daniel Brown,CeCe Gilroy,Johny Mat,Drew Filmore,Natalie Day,
CS Programming in C
Fall
tableOlivia Cobb,Mat Fullerton,Noel Ken,Chris Gill,
tableTRANSACTIONSDATAccount#tableTransactionTypetableAmount inUSDDWDDWDWWWDDWDWWWDDWDw
tableTRANSACTIONSDATAccount#Transaction Type,Amount in USDDWDDWDWWWDDWDWWWDDWDWWWDDWDWWW
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
