Skip to main content

PROGRAMMING FOR PROBLEM SOLVING

PROGRAMMING FOR PROBLEM SOLVING



PROGRAMMING FOR PROBLEM SOLVING LAB SYLLABUS


Course Objectives:

  • Learning the fundamentals of computers.
  • Understand the various steps in program development.
  • Learning the syntax and semantics of C programming language.
  • Learning the usage of structured programming approach in solving problems.

Course Outcomes: The student will learn

  • To write algorithms and to draw flowcharts for solving problems.
  • To convert the algorithms/flowcharts to C programs.
  • To code and test a given logic in C programming language.
  • To decompose a problem into functions and to develop modular reusable code.
  • To use arrays, pointers, strings and structures to write C programs.
  • Searching and sorting problems.

 Syllabus

Unit - I
 Introduction to Programming

Introduction to components of a computer system: 

  • disks, primary and secondary memory, processor, operating system, compilers, creating, compiling and executing a program etc.,
  • Number systems

Introduction to Algorithms: 

  • steps to solve logical and numerical problems. 
  • Representation of Algorithm, Flowchart/Pseudo code with examples, 
  • Program design and structured programming

Introduction to C Programming Language: 

  • variables (with data types and space requirements), 
  • Syntax and Logical Errors in compilation, 
  • object and executable code ,
  • Operators, expressions and precedence, 
  • Expression evaluation, Storage classes (auto, extern, static and register), 
  • type conversion, 
  • The main method and command line arguments

Bitwise operations: 

  • Bitwise AND, OR, XOR and NOT operators

Conditional Branching and Loops:

  • Writing and evaluation of conditionals and consequent branching with if, if-else, switch-case, ternary operator, goto, 
  • Iteration with for, while, do while loops

I/O: 

  • Simple input and output with scanf and printf, formatted I/O, 
  • Introduction to stdin, stdout and stderr. 
  • Command line arguments

Unit - II 
Arrays, Strings, Structures and Pointers

Arrays:

  • one and two dimensional arrays, 
  • creating, accessing and manipulating elements of arrays

Strings:

  • Introduction to strings, handling strings as array of characters, 
  • basic string functions available in C (strlen, strcat, strcpy, strstr etc.), 
  • arrays of strings

Structures: 

  • Defining structures, initializing structures, 
  • unions, 
  • Array of structures

Pointers: 

  • Idea of pointers, Defining pointers, 
  • Pointers to Arrays and Structures, 
  • Use of Pointers in self-referential structures, 
  • usage of self referential structures in linked list (no implementation)

Enumeration data type

Unit - III
 Preprocessor and File handling in C

Preprocessor: 

Commonly used Preprocessor commands like 
  • include, 
  • define, 
  • undef,
  •  if, 
  • ifdef, 
  • ifndef

Files: 

  • Text and Binary files, 
  • Creating and Reading and writing text and binary files, 
  • Appending data to existing files, 
  • Writing and reading structures using binary files, 
  • Random access using fseek, ftell and rewind functions.

Unit - IV
 Function and Dynamic Memory Allocation

Functions: 

  • Designing structured programs, 
  • Declaring a function, Signature of a function, 
  • Parameters and return type of a function, 
  • passing parameters to functions, 
  • call by value, 
  • Passing arrays to functions, passing pointers to functions, 
  • idea of call by reference, 

Some C standard functions and libraries

Recursion: 

  • Simple programs, such as Finding Factorial, 
  • Fibonacci series etc., 
  • Limitations of  Recursive functions

Dynamic memory allocation: 

  • Allocating and freeing memory, 
  • Allocating memory for arrays of different data types

Unit - V
Introduction to Algorithms 

Algorithms for finding

  • roots of a quadratic equations, 
  • finding minimum and maximum numbers of a given set, 
  • finding if a number is prime number, etc.

Basic searching in an array of elements 

  • linear search techniques and 
  • binary  search techniques

Basic algorithms to sort array of elements

  • Bubble sort algorithm, 
  • Insertion sort algorithm and 
  • Selection sort algorithm

Basic concept of order of complexity through the example programs



TEXT BOOKS:

1. Byron Gottfried, Schaum’s Outline of Programming with C, McGraw-Hill
2. B.A. Forouzan and R.F. Gilberg C Programming and Data Structures, Cengage Learning, (3rd
Edition)

REFERENCE BOOKS:

1. Brian W. Kernighan and Dennis M. Ritchie, The C Programming Language, Prentice
2. Hall of India
3. R.G. Dromey, How to solve it by Computer, Pearson (16th Impression)
4. Programming in C, Stephen G. Kochan, Fourth Edition, Pearson Education.
5. Herbert Schildt, C: The Complete Reference, Mc Graw Hill, 4th Edition


To download the syllabus click here

Comments

Post a Comment

Popular posts from this blog

Learning and Development Interview Questions and answers for Mathematics-1.

  1). What is Mean, Mode and Median? Solution Answer: The mean is the average of a  collection of numbers or terms in a sequence. To calculate the mean use a formula is sum of total terms divided  by number of terms. The mode  is the most f requent number or term in a sequence. It means the number that occurred  highest number of times  in a sequence. To find the mode arrange the numbers in ascending or descending order and verify which number repeated most number of times in a sorted sequence. The median is the middle number/term where the sequence is arranged in ascending or descending order. If the sorted sequence have odd number of terms then  divide by 2 and round up to get the position of the median number.  If the  sorted sequence  have  even  number of terms then  divide by 2  to get the position of the median number.  2 ). What is the Difference between Fractional and Rational number? Solu...