BITM Structured Programming
bitmsemester 2
Unit 1:Introduction to the C Language
The C Language and its Advantages. The Structure of a C Program, Writing C Programs, Debugging a C Program. Examining and Running a C Application Program.
Unit 2:Data Types and Variables
Data Types (integer, floating, character, type conversion, type definitions, sizeof operator).
Unit 3:Input/Output Management
Input/Output Management: printf(), scanf(). Conversion specifiers. Escape sequences.
Unit 4:Expressions and operators
Arithmetic operators: operator precedence and associativity. Assignment operators. Increment and decrement operators. Expression evaluation. Expression statements. Relational operator, logical operator, arithmetic assignment.
Unit 5:Selection statements
Logical expressions. If statement. Switch statement.
Unit 6:Loops
While. Do..while. For. Exiting from a loop (break, continue, goto).
Unit 7:Arrays
One-dimensional array. Multidimensional array.
Unit 8:Modular Programming with Functions
Defining and calling functions. Function declarations. Arguments. Return statement. Program termination (exit function).
Unit 9:Pointers and Strings
Pointer variables. The address and indirection operators. Pointer assignment. Pointer as argument. Pointer as return values. Pointer Arithmetic. Using pointers for array processing. String literals, variables. Reading and writing strings. Using the C string library: strcpy, strlen, strcat, strcmp. Arrays of strings.
Unit 10:Structures and Dynamic Memory Allocation
Structures, Arrays of Structures. Passing Structures to Functions. Nested Structures. Unions. enumerations. Dynamic Memory Allocation (malloc, calloc, realloc). Deallocating storage. Linked list (-> operator, creating, displaying, searching).
Unit 11:The Preprocessor
How the preprocessor works. The C Preprocessor and the #include and #define Directives. Macro definitions (simple, parameterized macros), general properties of macros. #if and #endif directives. The defined operator.
Unit 12:File Input/Output
Streams: file pointers, standard streams and redirection, text files versus binary files. File operations: opening a file, modes, closing a file, attaching a file to an open stream, obtaining file names from the command line. File Input and Output, reading/writing data, structure to files, random access.
