Difference between revisions of "CSC231 Final Exam 2017"

From dftwiki3
Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
--[[User:Thiebaut|D. Thiebaut]] ([[User talk:Thiebaut|talk]]) 16:23, 29 April 2017 (EDT)
 
--[[User:Thiebaut|D. Thiebaut]] ([[User talk:Thiebaut|talk]]) 16:23, 29 April 2017 (EDT)
 
----
 
----
 +
<onlydft>
  
<onlydft>
 
 
<bluebox>
 
<bluebox>
 
<font color="purple">This exam is due on May 12, at '''4:00 p.m.'''.</font>
 
<font color="purple">This exam is due on May 12, at '''4:00 p.m.'''.</font>
 
<br />
 
<br />
This exam is given under the rules of the ''honor code''. You have access to all your notes, to books, and to the Web. You cannot, however, discuss the details of the exam with anybody other than your instructor. <font color="magenta">'''Questions regarding the exam can only be asked in class, or using Piazza'''</font>.  Do '''not post code''' on Piazza.  Do not suggest or imply possible solutions in your posts on Piazza.  
+
This exam is given under the rules of the ''honor code''. '''It has to be done individually'''. You have access to all your notes, to books, and to the Web. You cannot, however, discuss the details of the exam with anybody other than your instructor. <font color="magenta">'''Questions regarding the exam can only be asked in class, or using Piazza'''</font>.  Do '''not post code''' on Piazza.  Do not suggest or imply possible solutions in your posts on Piazza.  
 
<br />
 
<br />
 
All five problems are worth the same number of points (20/100).
 
All five problems are worth the same number of points (20/100).
Line 15: Line 15:
 
=Problem 1: C Programming=
 
=Problem 1: C Programming=
 
<br />
 
<br />
Write a C program called '''231grep.c''' that works similarly to the Linux grep command.  Your program should get its input from the command line, just like grep, and support the "-i" switch.  When the user uses this switch, the search is not case sensitive.  When the user omits the switch the search is case-sensitive.
+
Write a C program called '''231grep.c''' that works similarly to the Linux grep command.  Your program should get its input from the command line, just like grep, and support the "-i" switch.  The user will '''never''' use another switch, if she uses one.  When the user uses this switch, the search is not case sensitive.  When the user omits the switch the search is case-sensitive.
 
<br />
 
<br />
 
Here is an example illustrating how your program should work.
 
Here is an example illustrating how your program should work.
Line 51: Line 51:
 
::# word  
 
::# word  
 
::# file name
 
::# file name
 +
* You may assume that lines will never be more than 1000 characters long.
 
<br />
 
<br />
 +
 
==Testing==
 
==Testing==
 
<br />
 
<br />
Line 259: Line 261:
 
<br />
 
<br />
 
<br />
 
<br />
<onlydft>
+
</onlydft>

Latest revision as of 17:48, 10 December 2017

--D. Thiebaut (talk) 16:23, 29 April 2017 (EDT)



...