Working with files

Tasks

Task 1. Write and test under a debugger a simple clone of the cp utility. Make sure to test for errors.

Task 2. Write a C program that dumps the content of a double variable to the standard output. Try to make sense of the output with piping it thtrough hexdump -e '/8 "%x"' | xxd -r -p | xxd -b -c 8 (this is this complicated because of endiannes) and https://en.wikipedia.org/wiki/IEEE_754.

Task 3. Try to write a C program that outputs the bits in a double variable (similar to the final output of the command in the previous task).

Task 4. Write a clone of cat. Try to imitate the way cat works with and without arguments.