Department of CSE, IIT Kharagpur

Programming and Data Structure Laboratory
CS19003, Autumn 2021-22
Section 20

Lab hours: Tuesday, 9:00 -- 11:55 AM

Announcements

  • First class on Tuesday, Dec 7, 2021 at 9:00 AM -- join the online meeting room of Prof. A. Das and Prof. S. Ghosh (the course teachers) using this Microsoft Teams link

  • Students are divided into 8 groups -- see "Lab related Resources for Students" to know which group you are in

  • Each student should create an account on the Moodle system of CSE department -- see " Lab related Resources for Students"

  • There is a strict policy against adoption on unfair means / malpractice -- see "Lab related Resources for Students"

  • Tentative dates for Lab Tests are January 11, February 1, and March 1

  • Lab Test 1 will be on January 11.

Lab related Resources for Students

  • Student groups -- students have been divided into 8 groups, and each group assigned to a particular TA (See "Teaching Personnel")

  • Programming environments -- We suggest using either Linux Operating System (which comes with its own C programming environment), or the CodeBlocks Integrated Development Environment (IDE). Whichever platform you use, make sure you can submit .c (C source code) files for the assignments.

  • A video guide on basic CodeBlock use for writing C programs - by Professor Arobinda Gupta. There is one error in the video -- If you want to download CodeBlocks to install on your PC, you should use the file codeblocks-20.03mingw-setup.exe (instead of the file codeblocks-20.03-setup.exe as told in the video). Both files should be in the same place (as shown in the video). To just install it, accept all default options.

  • Malpractice -- Rules and Guidelines

C programming resources

How a Lab session will proceed (unless declared otherwise)

  • At 9:00 am, ALL students should join the meeting room of the course teachers (see "Teaching Personnel" for the meeting room link).The course teachers will introduce the assignments of the day, make general declarations, etc. During this session, every student should keep their microphone on "mute", and only the course teacher(s) will speak. If you have any question, do not start speaking suddenly. There is a "chat" where you can type in your question. The speaker will see the question and answer in some time.

  • After the session with the course teacher(s), each student should join the meeting room of the specific TA to whom he/she is assigned. Students have been divided into 8 groups -- see "Lab-related Resources for Students" to know which group you are in. Remember your group number. Each group has been assigned to a TA. See "Teaching Personnel" to know which TA your group has been assigned to, and join the meeting room of that TA.

  • On every regular Lab day, an assignment will be given, comprising of a set of C programming questions. You will have to solve the questions and submit your programs before the end of the Lab session. All assignment submissions will be via the Moodle system of the CSE department. You should familiarize yourself with the Moodle system on the first day, so that you can submit assignments henceforth. See "Rules for Lab Sessions and Assignments".

  • If there is any change to the above description, you will be notified. E.g., if a particular TA cannot attend the Lab session on a certain day, then the students of the corresponding group (allocated to that particular TA) will be asked to join the meeting room of other TAs for that day. Such changes will be declared as and when necessary.

Rules for Lab Sessions and Assignments

  • On every regular Lab day, an assignment will be given, comprising of a set of C programming questions. You will have to solve the questions and submit your programs before the end of the Lab session. Whatever programming platform you use, you will finally have to submit a C source file (.c file) for each question. We will not accept any other form of submission.

  • There can be multiple questions in a particular assignment. For each question, you need to submit a separate C source file (.c files). Each question will have it's own submission link. You should upload your solutions to the desired submission link. Not following these instructions can lead to penalty.

  • Keep your account password private.

  • For every assignment, the submission deadline on Moodle will be set to 11:55 AM (end of the scheduled lab hours). At this time (according to the Moodle clock), the submission link will close, and no further submission will be possible. You are required to submit your programs within the deadline. If you miss the deadline, you get zero marks for the corresponding assignment. It is advisable to submit 10-15 minutes early, without waiting for the last minute.

  • In the initial few weeks, the TAs will help you solve the assignments (if necessary). Feel free to ask them if you are having problems -- such interactions should be in the meeting room of your assigned TA. However, you should NOT only depend on the TAs, but try to become self-sufficient in solving the programming questions. Help from TAs will reduce as the semester progresses.

  • Assignments are to be done individually. As stated above, you can take the help of a TA. But you should NOT take the codes from any other student, or copy codes from the Web. Any sort of unfair means / malpractice will be heavily penalized. See rules about malpractice under "Lab related Resources for Students".

  • Attendance to every Lab session is mandatory. The TAs will be marking who all are present. Assignment submission of a student will NOT be accepted unless he/she is present during the lab session for interaction with the assigned TA. If any student misses a Lab session, he/she will have to provide a genuine compelling reason (e.g., medical emergency). The student will have to provide supporting documents to justify the reason.

Rules for Lab Tests

  • On the day of the test, a set of C programming questions will be given. You will have to solve the questions and submit your programs within the stipulated time via Moodle. You will have to submit a compressed file containing a C source file (.c file) for each question. [This part is very similar to what happens during a normal Lab session.]

  • The submission deadline on Moodle will be set according to the stipulated time for the test. At this time (according to the Moodle clock), the submission link will close, and no further submission via Moodle will be possible. You are required to submit your programs within the deadline. If you miss the deadline, you will be penalized 25% of the full marks of the test. It is advisable to submit 5-10 minutes early, without waiting for the last minute.

  • There will not be any help from TAs during a Lab Test.

  • Lab Tests are to be taken individually. You cannot take the help of any TA or any other student or any one else during the test. Also you are not allowed to look at any code on the Web or any book, etc during the test. Any sort of unfair means / malpractice will be heavily penalized, which may amount to getting zero in the whole test.

  • If any student misses a Lab Test, he/she will have to provide a genuine compelling reason (e.g., medical emergency). The student will have to provide supporting documents to justify the reason.

Good programming guidelines


You should follow some good programming practices while writing programs, so that it is easier for you as well as others to understand your codes:

  • Use meaningful variable names, that give an idea of what value a variable stores (e.g., variable names like ‘total’, ‘area’, etc., and not just ‘x’, ‘y’, 'z', etc).

  • While taking user-input, display a prompt, e.g., “Enter the next value: ”, or “Enter the length of side of the triangle: ” (which will inform the user what value is to be entered).

  • Use proper indentation in your codes

  • Document your code by writing meaningful comments. E.g., before a loop, write a short description of what the loop does in every iteration.

Course Evaluation

  • Weekly assignments: 50%

  • Programming tests (3 in number, best 2 to be considered): 50%