This preview shows page 1. Sign up to view the full content.
Unformatted text preview: In the main body of your program, create a structure with three integer fields. Write a function add_fields() which takes the structure as a parameter, adds the first two fields and stores the result in the third field. Function main() initializes the structure, calls the add_fields() function, then prints the fields of the structure. Problem 4: Write a program which takes two file names as argument from command line, reads the contents of the first file into the memory, and writes its contents to the second file in reverse order. You need to use file I/O functions such as open, close, read, write, lseek etc....
View Full Document
- Fall '10