Introduction to Computer Programming II
1. (100 pts) Dowload the file assignbonus.c from class webpage and reduce the size of the file
without changing the functionality. The two programs should do the same thing but the new
file should be shorter.
To find the number of characters in the file use the wc command as follows
wc -c assignbonus.c
Original file has 895 characters in it. You can use the following techniques to reduce the size.
• Remove comments.
• Declare all variables of one type on one line.
• Reuse variables instead of declaring new variables.
• Use operators like += instead of using + and =
• Other things that you can think of.
Once you do all the reductions you can think of, look at the size of the executable file for the
original file and new file and see how they differ.
Submit your program electronically using the blackboard system
The program you submit should be your own work. Cheating will be reported to office of academic
integrity. Both the copier and copiee will be held responsible.