Welcome to CS0.101 Computer Programming #
Girish Varma
Admin Stuff #
Teaching Team #
Instructors: Girish Varma
Head TA: Sajjid Ansari TAs:
How to ace this course? #
12 Weeks Course (excluding exam/holiday/prep weeks)
Session | Time (hrs) | Marks (%) |
---|---|---|
2 Lectures | 2 x 1.5 | - |
1 Tutorial | 1 x 1 | - |
1 Lab | 1 x 3 | 1.0 |
Reading/Practice | 3 | |
Assignment | 3 | 2.0 |
Total Time per week: 13 hrs
Total Problem solving per week: 3 (Lab) + 2 (Tut) + 2 (Assgn) + 2 (Practice) = 9
Evaluation #
Component | Marks (%) | |
---|---|---|
Lab | 10 x 1 | |
Assignments | 7 x 2 | |
Quiz | 8 x 2 | |
Mid Term | 10 + 15 | Written + Lab |
End Sem | 15 + 20 | Written + Lab |
Solve 100 problems over the entire course.
Websites #
Course Website: https://cpro-iiit.github.io/ All lecture/lab/tutorial material is posted. Additional information, links to other courses/tutorials on the web.
Introduction to Computer Programming #
What this Course is about? #
Genie needs to be instructed precisely, otherwise it will not respond!
It will precisely do, what you told it to do! If you meant something else and that was your problem.
Genie only understand a language, which has no scope for confusion/ambiguity.
Basic Computer Organisation #
Programming Languages #
Intro to C Programming #
Hello World! C Program #
main.c
file. Try it out at https://www.programiz.com/c-programming/online-compiler/
// 1. This line is a comment that is ignored by compiler.
// 2. include standard library for input/output. Allows to print to shell
#include <stdio.h>
// 3. execution start inside this **function** named main.
int main()
{ // start of main function
// 4. prints to the shell
printf("Hello, world\n");
return 0; /* 5. returns integer 0 */
} // end of main function
Running the Program #
- Run gcc compiler to get executable file
main
gcc main.c -o main
- Run the executable
main
./main
Comments for C: #
- Whole-line comment
- Partial line comment
- Multiple line comment
Programiz, web editor: https://tinyurl.com/bdd55vwn// This is a whole-line comment variable = 5; // this is partial line comment /* and comment comment .. */