1. | Write a C program to find the average of a sequence of numbers stored in a text file.
Sample Output |
||||||||||||||||||||||||||||||||||
2. | Write a C program to read a sequence of numbers from a text file and then write it to another text file in reverse order.
Sample Output |
||||||||||||||||||||||||||||||||||
3. | Write a C program to input a sequence of numbers from the text file "q03_in.txt". Then, prompt the user to enter a number and find its position in the array. Sample Output |
||||||||||||||||||||||||||||||||||
Optional | |||||||||||||||||||||||||||||||||||
4. | Write a C program to read a sequence of names from the text file "q04_in.txt", sort it into descending order, and then send the output to another text file "q04_out.txt". | ||||||||||||||||||||||||||||||||||
5. | Write a C program to encrypt a text file by using each of the following methods:
(a) replacing every character in the file by its predecessor, that is, c = c – 1. |
||||||||||||||||||||||||||||||||||
6. | Write a C program to read a sequence of words from the text file "q06_in.txt", extract those words with "'era"' as a substring and then send the output to the text file "q06_out.txt". | ||||||||||||||||||||||||||||||||||
7. | Complete the Telephone Enquiry System so that it can generate
the sample output as shown below. Program Outline
Sample Output
Telephone Enquiry System Inserting record... Telephone Enquiry System
Telephone Enquiry System Deleting record... Telephone Enquiry System
Telephone Enquiry System Updating record... Telephone Enquiry System
Telephone Enquiry System
|
||||||||||||||||||||||||||||||||||
8. | Write a C program to simulate the operation of an Automatic
Teller Machine. Structures and functions should be used in this program.
Sample Output Userid: Tiffany_Yu Select one of the following options: Choice: 4 Your account balance is $63300 Select one of the following options: Choice: 1 Enter the amount you have to withdraw: 1700 Select one of the following options: Choice: 5 Thanks for using the ATM services Welcome to Hong Kong Bank Userid: Kristy_Chan Select one of the following options: Choice: 3 To which account you want to transfer your money: Tiffany_Yu Select one of the following options: Choice: 5 Thanks for using the ATM services Welcome to Hong Kong Bank Userid: Tiffany_Yu Select one of the following options: Choice: 4 Your account balance is $63600 Select one of the following options: Choice: |
||||||||||||||||||||||||||||||||||