IIIT Una (IIITU) · CSMC101
Basics of Programming in C
Major core · L-T-P-C 3-0-2-4 · 3 h lectures · 2 h practicals a week · 4 credits
Units
Unit I
Introduction to Computers and Problem Solving Tools
Evolution of Computers, History of Computers, Computer Organization, Characteristics, Hardware and Software, Modes of operation, Types of programming languages, developing a program. Algorithms, Characteristics, Flowcharts, Principles of Structured and unstructured programming, Functional Languages, Sequential, selective structures, Repetitive structures, Bounded, Unbounded and Infinite iterations – Examples for each.
Unit II
Introduction to C Programming
C character set, Identifiers and Keywords, Data types, Constants, Variables, Declarations, Expressions, Statements, Symbolic constants, Operators, Library functions, Data input and output: Single character input and output, entering input data, writing output data, gets and puts functions, Control and Conditional statements, Modular Programming.
Unit III
Functions in C Programming
Defining a function, accessing a function, Function prototypes, passing arguments to a function, passing arrays to a function, Functions and Procedures, Examples, Parameter passing methods. Arrays, defining an array, processing an array, Multidimensional arrays.
Unit IV
Pointers and Memory Management
Introduction, Passing pointers to a function, Recursion. String Handling, Introduction to Strings, Sample Program, Standard String Library Functions, Array of String.
Unit V
Structures, Unions and File Handling
Structures and Unions, Declaring and Instantiating Structures, Structures as Parameter and Pointer to Structures, Enumerated Data Types, Union, Bit Fields, File Processing. Concept of Files, File Opening in Various Modes and Closing of a File, reading from a File, Writing onto a file.
Lab experiments
- Basics of C programming.
- Conditional statements in C.
- Control statements in C.
- Arrays and pointers in C.
- Functions in C.
- String handling functions in C.
- Structures and unions in C.
- File handling in C.
Books
Text books
- C How to Program, Paul Deitel and Harvey Deitel, Prentice Hall, 8th edition, 2015
- The C Programming Language, Brian W. Kernighan and Dennis M. Ritchie, Prentice Hall, 2nd edition, 2012
- Programming with C (Schaum's Outlines), Byron S. Gottfried, Tata McGraw-Hill, 2nd edition, 2016
Reference books
- How to Solve It by Computer, R. G. Dromey, Pearson Education, 4th reprint, 2007
- Let Us C, Y. Kanetkar, BPB Publications
- Problem Solving and Program Design in C, J. R. Hanly and E. B. Koffman, Pearson Education, 6th edition, 2009