Indian Institute of Information Technology, Allahabad

Problem Solving with Programming (PSP)

July-Dec 2024 Semester


Course Information

Course Description: In this course, students learn the problem solving concepts with programming and practice them using C language.

Course Outline:

Unit 1:

  • Computer hardware, Memory, CPU, Input/ Output devices
  • Computer Networks, LAN, File Server, WAN, WWW, GUI/CLI, Ethernet, Wi-Fi, Modem, Switches, Routers, IP Address, Proxy, Gateway
  • Operating Systems, Installation/Uninstallation, Disk/Directory/Files system, Application Software

Unit 2:

  • Professional Ethics for Computer Programmers
  • Introduction to Computer Languages, Compiling and running a Program
  • Problem analysis (requirement analysis, program design), Algorithms Pseudocode and Flowchart
  • Structure of a simple C program (preprocessor directive, #include and #define directives, header files and library files) Debugging, Testing and Documentation (compiler error, linker error, and run-time error)
  • Basic Data Types, Constants/ Literals, Expressions, Statements and Comments
  • Operators: Arithmetic Relational, Logical, Boolean, Ternary, Bitwise, Conditional, Sizeof, Comma, Precedence and Associativity, implicit and explicit type conversion
  • Standard Input and Output, Mathematical Functions, Character Functions

Unit 3:

  • Selection Statements (if/else, nested, switch)
  • Loop Structures (while, do/while, for, exit, break and continue)
  • Array: 1-D arrays, Passing Arguments by Value/Address, 2-D Arrays, Higher dimensional Arrays

Unit 4:

  • User defined functions, Storage class and Scope, Macros, Nested and Recursive Function
  • Character Strings, Definition and I/O, Null Character, String Library Functions
  • Pointer and Addresses, Address Operator, Pointer Assignment, Address Arithmetic, Chain of Pointers, Pointers to Array Elements, Array of Pointers, Pointers as Function Arguments, Function Returning pointers, Pointers and Strings.

Unit 5:

  • Dynamic Memory Allocation (calloc(), malloc(), realloc(), free())
  • Structures: Definition and Initialization, Input and Output, Structures as Function Arguments, Functions returning Structures, Array of Structures, passing array of structure to function, Nested Structures, Unions
  • Pointer to Structure, Dynamic Data Structure: Linked List, Stack, Queue
  • Data Files: I/O Statements, Reading data files, End-of-File, Generating data files

Course Instructor

Dr. Shiv Ram Dubey

TAs

  • RSI2024504 - Deeksha Gupta
  • PMM2023001 - Manish Das
  • MML2023004 - Shubham Harsh
  • MCL2023011 - Rahul Kumar
  • PMR2024003 - Kushagra Srivastava
  • MNS2024005 - Utkarsh Kumar
  • MNS2024006 - Ujjwal Agrawal
  • MRH2024009 - Gourav Rajput
  • MSD2024006 - Deepak Kumar

Class Schedule (Section B)
Class:
Course Ethics
  • Students are strictly advised to avoid the unethical practices in the course including tests and practice components.
  • It is best to try to solve problems on your own, since problem solving is an important component of the course.
  • You are allowed to discuss class material, problems, and general solution strategies with your classmates. But, when it comes to formulating or writing solutions you must work/implement by yourself.
  • You are not allowed to take the codes from any source, including online, books, your classmate, etc. in the assignments and exams.
  • You may use free and publicly available sources (at idea level only), such as books, journal and conference publications, and web pages, as research material for your answers. (You will not lose marks for using external sources.)
  • You may not use any paid service and you must clearly and explicitly cite all outside sources and materials that you made use of.
  • Students are not allowed to post the code/report/any other material of course assignment/project in public domain or share with any one else without written permission from course instructors.
  • We consider the use of uncited external sources as portraying someone else's work as your own, and as such it is a violation of the Institute's policies on academic dishonesty.
  • Instances will be dealt with harshly and typically result in a failing course grade.
  • Cheating cases will attract severe penalties.

Schedule

Lecture Topic Class Material
L01 Introduction Slide
L02 Data Types and Expressions Slide
L03 Conditionals and Branching Slide
L04 Loops and Iteration Slide
L05 Arrays Slide
L06 Function Slide
L07 Recursion Slide
L08 Two Dimensional Array Slide
L09 Structures Slide
L10 Pointers Slide
L11 Dynamic Memory Allocation Slide
L12 Linked List
L13 File Handling and Command Line Argument
L14 Sorting and Searching

Grading

  • Internal (30%)
  • Mid Exam (25%)
  • End Exam (45%)

Prerequisites

  • Ability to deal with abstract mathematical concepts

Books/References

  • The C Programming Language by Brian W. Kernighan and Dennis M. Ritchie, Prentice Hall
  • Engineering Problem Solving with C, 4th Ed. (2016) by Delores M. Etter, Pearson
  • C: How to Program, 9th Edition (2023) by Paul Deitel and Harvey Deitel, Pearson
  • Programming with C, Byron Gottfried
  • Programming in ANSI C, E. Balaguruswamy
  • Expert C Programming: Deep C Secrets by Peter van der Linden, Prentice Hall
  • C Programming FAQs by Steve Summit, Deborah Lafferty, Addison-Wesley Professional
  • C Traps and Pitfalls by Andrew Koenig, Addison-Wesley Professional
  • The C Puzzle Book by Alan R. Feuer, Addison-Wesley Professional
  • Data Structures, S. Lipschutz, Schaum’s Outline Series

Disclaimer

The content (text, image, and graphics) used in this slide are adopted from many sources for Academic purposes. Broadly, the sources have been given due credit appropriately. However, there is a chance of missing out some original primary sources. The authors of this material do not claim any copyright of such material.