Thursday, September 12, 2019



COMPUTER PROGRAMMING LAB 

Pre-requisites     :  NIL

Course Educational Objective: In this course student will learn about
Software development tools like algorithm, Pseudo codes and programming structure. Basic elements C programming structures like data types, expressions, Control statements, various I/O functions and how to solve simple mathematical Problems using control structures. Design and implementation of various software components which solve real world problems.

Course Outcomes: At the end of the course the student will be able to
CO1: Apply and practice logical formulations to solve some simple problems leading to specific applications.
CO2: Demonstrate C programming development environment, compiling, debugging, linking and executing a program using the development environment.
CO3: Design effectively the required programming components that efficiently solve computing problems in real world.
Mandatory: All Programs must have Algorithms and Flow Charts

LAB CYCLESSYLLABUS

I)         Exercise Programs on Basics of C-Program
Write a program in ‘C’ language to cover the following problems.
a)       Example program which shows the usage of various preliminary Data types available in            C Language.
b)      Example program which shows the usage of various Operators available in C Language.
c)       Example programs to illustrate the order of evaluation.

II) Exercise Programs on Control Structures:
a)    To check whether the given year is leap year (or) not
b)    Roots of Quadratic Equation.
c)    Finding smallest& biggest number from the given set of 4 numbers using ‘if’ statement.
d)    Calculate the student grade in the examination – assume suitable Constraints.
e)    Prepare electricity bill for the consumed units – assume suitable Constraints.
f)    Converting given two digit number into words using switch statement
g)    To illustrate the usage of ‘goto’ statement.

III) Exercise Programs on Loops:
a)    To Display first N natural numbers
b)    To find whether the given number is Armstrong (or) not
c)    To find reverse of the given number and to check whether it is palindrome (or) not.
d)    To find whether given number is strong number (or) not.
e)    To check whether given number is Prime (or) not
f)    To display prime numbers with in the given range (Nesting of Loops).
g)    To display the following structure (Nesting of Loops)

IV) Exercise Programs on Arrays& Strings:
Write example programs in C Language to perform following operations:
a)       Finding the sum and average of given numbers using Arrays.
b)      To display elements of array in reverse order
c)       To search whether the given element is in the array (or) not using linear search &binary search.
d)      Write a C program to perform the following operations
                        i) Addition, subtraction and multiplication of Matrices
                        ii) Transpose of given matrix
(The above operations are to be exercised using functions also bypassing arguments)
e)       Write a C program to find whether the given string is palindrome    (or) not.
f)       To accept line of text and find the number of characters, number of vowels and number of blank spaces in it.
g)      Write an example program to illustrate the use of any 5 string handling functions.

V) Exercise Programs on Functions &Pointers:
a)       Example program to bring clarity on pointer declaration &   initialization and Pointer arithmetic.
b)      Write an example program to describe the usage of call by reference.
c)       Write a program to find sum of the elements of the array using functions.

VI)    Exercise Programs on Functions:
Write example programs in C Language:
a)    To find factorial of a given number using functions.
b)    Swap two numbers using functions.
c)    To find GCD of two numbers using recursion
d)    Write a recursive function to solve Towers of Hanoi problem.
e)    Write an example program to illustrate use of external &static storage classes.
f)    Write an example program to illustrate the usage of command line    arguments.
g)    Program to illustrate the usage of dynamic memory management functions.
VII) Exercise Programs on Derived data types:
a)    Write an example program using structures to process the student record. Assume suitable fields for student structures (Different   kinds of initialization of structure variables are to be exercised)
b)    Write a program to read records of 10 employees and find their average salary
       (Exercise array of structures & Nested structures concepts through this program).
c)    Write a program to handle a structure variable   using pointers and  implement self referential structure(i.e. A structure variable having a pointer to itself)
VIII) Exercise Programs on Files:
Write an example program on file to perform following operations:
a) Accessing content from files and writing content in to it.
          (Exercise different file operation modes)
b) Copy the contents of one file into another.
            (Exercise different file operation modes)

No comments:

Post a Comment

  ASE   INTRODUCTION TO PROGRAMMING ASSIGNMENT MARKS Click the link for Marks