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

  • Ajay Kumar Yadav - RSI2022002
  • Manish Das - PMM2023001
  • Swarnendu Banik - MHC2023012
  • Rahulkumar Ranjeet Jha - MCL2023011
  • Shubham Harsh - MML2023004

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
L02 Data Types and Expressions
L03 Conditionals and Branching
L04 Loops and Iteration
L05 Arrays
L06 Function
L07 Recursion
L08 Two Dimensional Array
L09 Structures
L10 Pointers
L11 Dynamic Memory Allocation
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.