Problem Solving and Programming | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Objectives The course is aimed to develop problem-solving strategies, techniques and skills that can be applied to computers and problems in other areas which give students an introduction to computer and analytical skills to use in their subsequent course work and professional development. Emphasis of this course is to act as an introduction to the thinking world of computers, to help students develop the logic, ability to solve the problems efficiently using C programming. Knowledge in a programming language is prerequisite to the study of most of computer science courses. This knowledge area consists of those skills and concepts that are essential to problem solving and programming practice independent of the underlying paradigm. The student will learn various concepts and techniques for problem solving and will implement those ideas using C programs. Syllabus BLOCK 1: An Introduction to C Unit 1: Problem Solving *Problem - Solving Techniques 0 Steps for Problem - Solving 0 Using Computer as a Problem Solving Tool *Design of Algorithms 0 Definition 0 Features of Algorithm 0 Criteria to be followed by an Algorithm 0 Top Down Design *Analysis of Algorithm Efficiency 0 Redundant Computations 0 Referencing Array Elements 0 Inefficiency Due to Late Termination 0 Early Detection of Desired Output Condition. 0 Trading Storage for Efficient Gains *Analysis of Algorithm Complexity 0 Computational Complexity 0 The Order of Notation 0 Rules for using the Big - O Notation 0 Worst and Average Case Behavior Flowcharts 0 Basic Symbols used in Flowchart Design Unit 2: Basics of C *What is a Program and what is a Programming Language? *C Language 0 History of C 0 Salient Features of C *Structure of a C Program 0 A Simple C Program *Writing a C Program *Compiling a C Program 0 The C Compiler 0 Syntax and Semantic Errors *Link and Run the C Program 0 Run the C Program through the Menu 0 Run from an Executable File 0 Linker Errors 0 Logical and Runtime Errors Diagrammatic Representation of Program Execution Process Unit 3: Variables and Constants *Character Set *Identifiers and Keywords 0 Rules for Forming Identifiers 0 Keywords *Data Types and Storage *Data Type Qualifiers *Variables *Declaring Variables *Initialising Variables *Constants 0 Integer Constants 0 Floating Point Constants 0 Character Constants 0 String Constants 0 Symbolic Constants Unit 4: Expressions and Operators *Assignment Statements *Arithmetic Operators *Relational Operators *Logical Operators *Comma and Conditional Operators *Type Cast Operator *Size of Operator *C Shorthand *Priority of Operators BLOCK 2: Control Statements, Arrays and Functions Unit 5: Decision and Loop Control Statements *Decision Control Statements 0 The if Statement 0 The switch Statement *Loop Control Statements 0 The while Loop 0 The do-while Statement 0 The for Loop 0 The Nested Loop *The Goto Statement *The Break Statement *The Continue Statement Unit 6: Arrays *Array Declaration 0 Syntax of Array Declaration 0 Size Specification *Array Initialization 0 Initialization of Array Elements in the Declaration 0 Character Array Initialization *Subscript *Processing the Arrays *Multi-Dimensional Arrays 0 Multi-Dimensional Array Declaration 0 Initialization of Two-Dimensional Arrays Unit 7: Strings *Declaration and Initialization of Strings *Display of Strings Using Different Formatting Techniques *Array of Strings 31 *Built-in String Functions and Applications 0 Strlen Function 0 Strcpy Function 0 Strcmp Function 0 StrcatFuncnon 0 Strlwr Function 0 Strrev Function 0 Strspn Function * Other String Functions Unit 8: Functions *Definition of a Function *Declaration of a Function *Function Prototypes *The Return Statement *Types of Variables and Storage Classes 0 Automatic Variables 0 External Variables 0 Static Variables 0 Register Variables *Types of Function Invoking *Call by Value *Recursion BLOCK 3: Structures, Pointers and File Handling Unit 9: Structures and Unions *Declaration of Structures *Accessing the Members of a Structure *Initializing Structures *Structures as Function Arguments *Structures and Arrays *Unions *Initializing an Union *Accessing the Members of an Union Unit 10: Pointers *Pointers and their Characteristics *Address and Indirection Operators *Pointer Type Declaration and Assignment 0 Pointer to a Pointer 0 Null Pointer Assignment *Pointer Arithmetic *Passing Pointers to Functions 0 A Function Returning More than One Value 0 Function Returning a Pointer * Arrays and Pointers *Arrays of Pointers *Pointers and Strings Unit 11: The C Preprocessor *# define to Implement Constants *# define to Create Functional Macros *Reading from Other Files using # include * Conditional Selection of Code using #ifdef 0 Using #ifdef for different computer types Using #ifdef to temporarily remove program statements *Other Preprocessor Commands *Predefined Names Defined by Preprocessor * Macros V s Functions Unit 12: Files *File Handling in C Using File Pointers Open a file using the function fopen ( ) Close a file using the function fclose( ) Input and Output using file pointers 0 Character Input and Output in'Files 0 String Input / Output Functions 0 Formatted Input / Output Functions 0 Block Input / Output Functions Sequential V s Random Access Files Positioning the File Pointer The Unbufferred I/O - The UNIX like File Routines
|
Comments
Post a Comment