CS 159 - Spring 2021 - Lab #11: Contact Prior
CS 159 - Spring 2021 - Lab #11: Contact Prior
What will you submit? A single C-file will be submitted electronically via the guru server. An example submission was
conducted as part of the Account Configuration Activity. If you have a concern regarding how to submit work, please
contact course staff prior to the deadline for this, and all, assignments. The programming assignment is due on Friday
April 30, 2021 at 11:00pm (LOCAL WEST LAFAYETTE, IN TIME). No late work will be accepted.
Collaborative Teaming:
• What if a partner does not respond to your communication? Then the remaining active partners need to be
prepared to proceed on the assignment to meet the deadline.
• Groups are expected to communicate to share their ideas when it comes to solving the conceptual and
programming problems associated with this lab. You may find a collaborative document to be a helpful way
to share thoughts on the written problems and to formulate the logic for the programming problem. Other on-line
tools may come in handy when trying to collaborate on specific segments of code, just make sure they protect
your code from being posted publicly! One popular service from previous semesters is codeshare.io.
• As a group you must determine who will make the final submission for your group, when that submission
will be made, and how the concerns regarding submission will be communicated with the other members. Only
one person per group will make submissions for the entire group. The grader for your section cannot be
expected to evaluate submissions from multiple members of the same group to determine which submission is the
official submission of the group. In order for each member of the group to get credit for the programming
problem associated with this lab, their Purdue University e-mail address must appear in the assignment
header.
1
(Task #1) - Solve the following problems related to material found in Chapters 9/10 and the course standards.
int i;
int a[5] = {1, 3, 5, 2, 4};
printf("\n");
2
Solve the following problems related to material found in Chapters 9/10 and the course standards.
Solve the following problems related to material found in Chapter 7 and the course standards.
3
Solve the following problems related to material found in Chapter 11 and the course standards.
Final result after odd and data values are sorted: {2, 4, 1, 3, 6, 8, 5, 7, 10, 9}
Other Requirements:
• The size of the data set is unknown until the program is running. This will necessitate the use of pointers and the
malloc function to create all of the arrays in your solution.
• Excessively large arrays or extra unnecessary arrays will be consider a deduction in the technique score when
your program is evaluated.
Example Execution #1 (described in example above):
Enter data set size -> 10
Enter 10 integer values -> 10 8 9 7 6 4 5 3 2 1
All course programming and documentation standards are in effect for this and each
assignment this semester. Please review this document!
4
Example Execution #2:
Enter data set size -> 12
Enter 12 integer values -> 12 10 8 6 4 2 11 9 7 5 3 1
5
Course Programming and Documentation Standards (continued):
• Use the course function header (head_fx vi shortcut hfx while in command mode) for every user-defined
function in your program.
◦ List and comment all parameters to a function, one per line, in the course function header.
◦ All function declarations will appear in the global declaration section of your program.
◦ The user-defined function definitions will appear in your program after the main function.
• Maximize your use of symbolic/defined constants and minimize your use of literal constants.
• Indent all code found within the main and all user-defined functions exactly two spaces.
• Place a single space between all operators and operands.
• Comment all variables to the right of each declaration. Declare only one variable per line.
• At no point during the semester should the local declaration and executable statement sections of a function ever
overlap.
• Select meaningful identifiers (names) for all variables in your program.
• Do not single (or double) space the entire program, use blank lines when appropriate.
Auto-Grade Tool
• We have implemented what is being referred to as the auto-grade tool. At the time of a successful assignment
submission you may receive some feedback on your program in regards to course programming and
documentation standards. This feedback may include a potential deduction that you will receive once your
assignment is reviewed by your grader.
• It is expected that graders verify those notes identified by this tool to ensure that they are indeed applicable and
reasonable to the submission. Graders may make additional deductions for those standards not identified by the
new tool.
• We hope that this feedback helps with the enforcement of course standards, consistency in grading across
sections, and to encourage students to revise their work when problems are identified before the assignment
deadline passes. It is possible to resubmit an assignment for grading up to the advertised deadline. Only the final
successful submission is retained and evaluated.