L-01: Introduction

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) ​

SessionTime (hrs)Marks (%)
2 Lectures2 x 1.5-
1 Tutorial1 x 1-
1 Lab1 x 31.0
Reading/Practice3
Assignment32.0

Total Time per week: 13 hrs
Total Problem solving per week: 3 (Lab) + 2 (Tut) + 2 (Assgn) + 2 (Practice) = 9


Evaluation #

ComponentMarks (%)
Lab10 x 1
Assignments7 x 2
Quiz8 x 2
Mid Term10 + 15Written + Lab
End Sem15 + 20Written + 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? #

bg right:50% w:500

  • 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 #

bg right:60% w:600


Programming Languages #

bg right:50% w:600


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 #

  1. Run gcc compiler to get executable file main gcc main.c -o main
  2. Run the executable main ./main

Comments for C: #

  • Whole-line comment
  • Partial line comment
  • Multiple line comment
  •       // This is a whole-line comment
          variable = 5; // this is partial line comment
          /* and 
          comment
          comment
          ..
          */          
    
    Programiz, web editor: https://tinyurl.com/bdd55vwn

Thanks #