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
This note was uploaded on 11/23/2011 for the course CSC 4303 taught by Professor Staff during the Fall '10 term at LSU.
- Fall '10