ADN 401T - Programming in ‘C’ using Linux  
 

Indicative contents

  • C Basics:
    C Program Compilation, History of C, Characteristics of C, C Program Structure, Variables, Constants, Arithmetic Operations, Comparison Operators, Logical Operators, Order of Precedence
  • Conditionals: The if statement, The ? operator, The switch statement
  • Looping and Iteration: The for statement, The while statement, The do-while statement, break and continue.
  • Arrays and Strings: Single and Multi-dimensional Arrays, Strings.
  • Functions: void functions, Functions and Arrays, Function Prototyping
  • Further Data Types: Structures, Unions, Coercion or Type-Casting, Enumerated Types, Static Variables
  • Pointers: What is a Pointer? Pointer and Functions, Pointers and Arrays, Arrays of Pointers, Multidimensional arrays and pointers, Static Initialisation of Pointer Arrays, Pointers and Structures, Common Pointer Pitfalls
  • Dynamic Memory Allocation and Dynamic Structures: Malloc, Sizeof, and Free, Calloc and Realloc, Linked Lists.
  • Advanced Pointer Topics: Pointers to Pointers, Command line input, Pointers to a Function, Low Level Operators and Bit Fields: Bitwise Operators, Bit Fields
  • The C Preprocessor: #define, #undef, #include, #if, Preprocessor Compiler Control, Other Preprocessor Commands.
  • C, Linux and Standard Libraries: Advantages of using Linux with C, Using Linux System Calls and Library Functions, Integer Functions, Random Number, String Conversion, Searching and Sorting, Mathematics, Input and Output (I/O),Reporting Errors, Streams, Basic I/O, Formatted I/O, scanf, Files, sprintf and sscanf, Low Level I/O, String Handling, File Access and Directory System Calls, Time Functions, Process Control, Interprocess Communication (IPC), Pipes, Interrupts and Signals, Sending Signals, Signal Handling, Message Queues, Semaphores, Shared Memory, Mapped memory, Sockets, Threads, Threads Programming, Deadlock,Remote Procedure Calls (RPC),Protocol Compiling and Lower Level RPC Programming, Procedures, Writing Larger Programs.
     

Module Resources

  • Essential reading
    1. Course Notes.
  • Recommended Reading
    1. Yashwant Kanetkar, “Let us C++”, first edition, BPB Publications ISBN 81-7656-106-1.
    2. Byron S. Gottfried, “Theory and problems of programming with C”, Second Edition, Tata McGraw-Hill Publishing Company, ISBN 0-07-463491-7.
    3. Herbert Schildt, “The complete reference in C”, Fourth Edition, Tata McGraw-Hill Publishing Company, 0-07-041183-2.
    4. Yashwant Kanetkar, “Data Structures Through C”, First Edition, BPB Publications, ISBN 81-7656-706-X.
    5. Langsam, Augenstein Tanenbaum, “Data Structures using C and C++”, Pearson Education, 2nd Edition