lab0
lab0
Laboratory (Section 4)
Lab0: Introduction
January 6, 2025
Rules of the game (we expect discipline and fair-play from you!)
▶ Attendance: Mandatory to get marks in each lab
▶ Plagiarism: Strict Penalty (sharing & copying both)
▶ Integrity: We have faith and full trust on you!
Lab Schedule:
▶ 06-Jan, 13-Jan, 20-Jan, 27-Jan, 03-Feb, 10-Feb, 17-Feb, 24-Feb,
03-Mar, 10-Mar, 17-Mar, 24-Mar, 31-Mar, 07-Apr, 14-Apr
(Midsem, Holiday)
Regular Evaluation:
▶ There will be approximately 11 regular labs
▶ Total weightage of 40% including all labs
Tests:
▶ There will be 2 lab tests
⋆ 10-Feb (tentative)
⋆ 07-April (tentative)
▶ Each test will have 30% weightage (so total 60% from lab tests)
First 15 minutes of the lab will be short tutorial & explanation of the
assignments
Role of TAs
▶ Will help you if you get stuck, or having trouble in understanding
▶ But they will not tell you the solution
Appeal of marks
▶ Has to be done within one week of releasing the marks
▶ Talk to your marking TA first. If you still have concerns, then talk to us
Do not get tense if you are running out of time and still couldn’t solve
the problems!
▶ You will get Partial Marks for your efforts even if the program is not
fully finished or correct
Programming language: C
(CSE, IIT Kharagpur) CS19003 : Programming and Data Structures LaboratoryJanuary
(Section6,4)
2025
Lab0: Introduction
8 / 22
Textbooks and References
Which compiler?
We will use GCC compiler in Linux machine (same will be used for
checking the assignments by the TAs)
Output
Hello, beautiful world!
Compilation
▶ Open a terminal in the same directory where you have saved the
program file
▶ You can also see the file(s) in the directory by typing ls command
▶ Type gcc ./hello.c in the terminal & press enter
▶ If the compilation is successful, an executable called a.out will be
created
Run
▶ Type the following command and press enter: ./a.out
▶ You will be able to see the output in the terminal itself
If the program has executed correctly, submit the file hello.c via
Moodle
▶ What should be the file name?
⋆ Name your file as <roll no> <assignment no> <question no>
⋆ If your roll number is 14CS10001 and you are submitting
lab/assignment 3 question number (a), then name your file as
14CS10001 3 a.c
⋆ So your file number for this lab can be 30CS10076 0 a.c
(CSE, IIT Kharagpur) CS19003 : Programming and Data Structures LaboratoryJanuary
(Section6,4)
2025
Lab0: Introduction
18 / 22
That’s all for today!
Questions?