210246: PROGRAMMING LAB
Teaching SchemeExamination Scheme Lectures: 2 Hrs./week Practical: 50 Marks
Term Work: 25 Marks
1. To understand the procedural and object oriented programming paradigms with C/C++
2. To understand the facilities for object orientation in C++
To understand and implement basic data structures
Review of ‘C’ programming
Identifiers, variables, constants, data types, operators and expressions, Assignment statement, Control Structures, Arrays, Functions, User defined functions, library functions: arithmetic, type conversion, string-manipulation, diagnostic routines, I/O, Formatted I/O: field width, justifications, signed numbers, using ‘*’ with scanf.
Pointers: Declaration, pointer operator, address operator, pointer expressions. Pointer arithmetic. Pointers and functions parameters: call by value and reference, pointer as a parameter, pointers to functions, passing function to another function, Pointers and Arrays, Pointers and strings, array of pointers, pointers to pointers.
Structures: Notion, declaration and initialization, structure variables, accessing and assigning values of the fields, “sizeof” operator, functions and structures, arrays of structures, nested structures, pointers and structures, self-referential structures.
Unions: Declaration, initialization, anonymous union.
Storage classifiers: auto, static, register and external.
Macro Preprocessor: macro definitions, macro with parameters, conditional compiling,
Bit Fields, bit-wise and shift operators, using hex, octal numbers, user-defined data types and enumerated data types, command-line arguments, using argc, agrv and env variables, dynamic memory management: malloc and free
C++: Extensions to C
Variable declarations, global scope, ‘const’, reference variables, comments, default parameters, function prototypes, function overloading, inline functions, default and constant arguments, ‘cin’, ‘cout’, formatting and I/O manipulators, new and delete operators.
Introduction to Object oriented Programming
Introduction to procedural, modular, object-oriented and generic programming techniques, Limitations of procedural programming, Need of object-oriented programming, fundamentals of object-oriented programming: objects, classes, data members, methods, messages, data encapsulation, data abstraction and information hiding, inheritance, polymorphism.
Classes and Objects
Defining a class, data members and methods, public, private and protected members, inline member functions, static data members, static member functions, ‘this’ pointer, constructors, destructors, friend function, dynamic memory allocation, array of objects, pointers and classes, class as ADTs and code reuse