Sample menu:






Welcome to the webpage of the COL100 course !!

Course Description

In this course we intend to teach the fundamentals of computer programming to the undergraduate students in the Computer Science department.

Instructor : Dr. Smruti R. Sarangi


Credits : 4   [3-0-2] (L-T-P)

L - Two lectures of 1 hour 15 minutes each will be conducted every week. Venue for the lectures is LHC 108.  

P - The practical component of the course involves lab work.

TextBook:

Programming with C, Byron Gottfried, Third Edition. (McGrawHill)


Slides:
(Thanks to Prof. Partha Pratim Das from IIT Kharagpur for his original slides)

1. Introduction to Computers and Programming (link)

Notes: Proof of the result for converting from binary to hex, and binary to octal (link)
My first C program (link)
printf and scanf (link)

2. Conditional operators and Loops. Slides (conditional operators, loops)
Programs: continue:example, exponentials, Fibonacci, Floyd's triangle, Floyd's Triangle (single loop), Loops, Primes

3. Functions and Recursion: slides (functions, recursion)
   Programs: Factorial, Fibonacci, General functions, GCD, Integer Reverse, Primes

4. Arrays: slides (1D arrays) (2D arrays)
    Programs: Simple arrays, max-min, palindrome, array concepts, screen decorator

5. Pointers (Basic Pointers, Pointers and Arrays, Parameters and Strings)
    Programs: Pointer basics, Swap Integers, Arrays-Pointers, Pointer Arithmetic,      String Handling

6. Sorting and Searching: (Sorting)
    Programs: Insertion Sort, Selection Sort, Merge Sort, Partition, Quick Sort

7. Structures, Unions, and Enumerations (slides)
    Programs: Example with structures, Unions, Structure union comparison, Enums

8. File Handling and the Command Line (slides) : File reading, File writing

9. Examples: String Swaps, Reading a paragraph, Calculating the day of the week,     String swap advanced

10. Bitwise operations: Swapping with bitwise operators

11. Minor 2: Sample solutions: 19 bits, array reversal, current time, ip address parsing, raising m^n

12. Linked Lists (slides): heap-stack (intro. to malloc), train-bogey, stack paranthesis matching

13. Stacks: link (with header files, classes, and with inheritance)

14. Miscellaneous:   Floating-point anomaly, Macros

15. Object-oriented Programming: Rectangle object, Example with shapes, Inheritance and virtual functions