Back
CS 456 Home

Final Exam

Last Updated: May 3 @ 3:20 PM EDT

Available: : May 4 @ 12:01AM EDT
Due Date: : May 8 @ 11:59PM EDT

Structure of the final

There are two parts to this final, one part is done on Canvas, the other is done on the CS Server.
Each part of this final is worth 50% of your final exam grade, and the final exam makes up 50% of 
your total grade in this class.

NOTE: I have to have all grades in by noon on May 12. I cannot grant any extensions beyond the due 
      date specified above. You will have the entire finals week to take the exam. 

Canvas: 
	This part will be similar in format to the quizzes, but longer. Pretty much anything we've done 
	this semester is fair game, so review your old quizzes and any notes you took, as well as the 
	readings you've done. I've gone over every quiz during the class meetings, so look at the 
	recordings for those.  

	The time limit on this section is 70 minutes, There will be 35 questions, 7 of which are short 
	answer, so I  will have to manually grade those. The other questions are your standard multiple 
	choice, True/False, fill-in-the-blank, matching etc. The exam questions itself are in the order of
	when we covered the material (older material first, newer material later)

	Access Code: finalexam

	This canvas exam will be made available on May 4 at 12:01 AM EDT.

Programming:
	This part will involve you writing a program in C on the CS Server. This will be no more difficult
	nor should be any longer than a homework assignment. It will also be something you've either done 
	before, or have seen in the readings/in-class code.

	The task:  
	
	You will be writing a C Program that takes a file from the command line and does the following:
	    - If this file is anything other than a directory, print a message saying so and exit
	    - If we get a directory, we will do this:
		- Count the number of following:
			- total number of files
			- regular files
			- directories
			- all other files that aren't regular files or directories
		- Get the total size (in bytes) of all regular files combined.

	Clarification: The counter will count the hidden files as well by default, this is perfectly fine,
		       you do not need to worry about filtering those out. 

	There are programs in the In-Class code that should help you out, especially in the mar18 directory. 
	Your old assignments may come in handy as well. As usual, I ask that you not depend on Generative AI 
	(like ChatGPT, etc) to do this part of the final. You should be able to do this based on the 
	examples given in the book and in the In-class code.

	To pick up this assignment, copy the final folder into your cs456 directory by running: 
			     cp -R /home/cs456/final/ ~/cs456/
			OR:  hw_get.py cs456 final

	Then use a text editor (like vi, nano, emacs) to open it and make the necessary edits to accomplish
	these objectives. Once finished, leave it in that directory. I will run a script to collect the 
	files when the due date comes.

	NOTE: If you would like me to check your program against my testing script before the due date
	      comes, let me know. Ill tell you if it works or if it doesn't. If it doesn't work, I'm not 
              going to be super detailed about why, but I will at least tell you what kind of output I got.

Both parts of the final will be due on May 8 at 11:59PM EDT. You will have the entire week to do the exam. Good Luck!