ChE154 COMPUTER PROGRAMMING LABORATORY

Lectures: 3 Periods/Week Sessional Marks: 25
University Examination: 3 hours. University Examination Marks: 50


List of programs (to be recorded)

  1. A program for electricity bill taking different categories of users, different slabs in each category. (Using nested if else statement).

    Domestic level Consumption As follows:

    Consumption Units Rate of Charges(Rs.)
    0 - 200 0.50 per unit
    201 - 400 100 plus 0.65 per unit
    401 - 600 230 plus 0.80 per unit
    601 and above 390 plus 1.00 per unit

    Street level Consumption As follows:

    Consumption Units Rate of Charges(Rs.)
    0 - 50 0.50 per unit
    100 - 200 50 plus 0.6 per unit
    201 - 300 100 plus 0.70 per unit
    301 and above 200 plus 1.00 per unit
  2. Write a C program to evaluate the following (using loops):
    1. 1 + x2/2! + x4 / 4!+ upto ten terms
    2. x +x3/3! + x5/5!+ upto 7 digit accuracy
    3. 1+x+x2/2! +x3/3!+ . . . upto n terms
    4. Sum of 1 + 2+ 3 + . . . . +n
  3. A menu driven program to check the number is:
    1. Prime or not
    2. Perfect or Abundant or deficient
    3. Armstrong or not
    4. Strong or not
    5. Fibonacci or not
  4. A menu driven program to display statistical parameters (using one-dimensional array)
    1. Mean
    2. Mode
    3. Median
    4. Variance
    5. Standard deviation
  5. A menu driven program with options (using one -Dimensional array)
    1. To insert an element into array
    2. To delete an element
    3. To print elements
    4. To print elements in reverse order
    5. To remove duplicates
  6. A menu driven program with options (using two dimensional array)
    1. To compute A+B
    2. To compute A x B
    3. To find transpose of matrix A
    4. To Check A=B
    Where A and B are matrices. Conditions related to size to be tested.

  7. A menu driven program with options (using Two-dimensional Character arrays)
    1. To insert a student name
    2. To delete a name
    3. To sort names in alphabetical order
    4. To print list of names
    5. To print names having maximum length, min. length
  8. A menu driven program (using pointers)
    1. Linear search
    2. Binary search
    3. Fibonacci search
  9. A menu driven program with options (using Dynamic memory allocation)
    1. Bubble sort
    2. Insertion sort
    3. Selection sort
  10. A menu driven program with options (using Character array of pointers)
    1. To insert a student name
    2. To delete a name
    3. To sort names in alphabetical order
    4. To print list of names
    5. To print names having maximum length, min. length
  11. Write a program to perform the following operations on Rational numbers (using Structures & pointers):
    1. Read a Rational number
    2. Addition of two Rational numbers
    3. Subtraction of two Rational numbers
    4. Multiplication of two Rational numbers
    5. Division of two Rational numbers
    6. Display a Rational number
  12. A Bookshop maintains the inventory of books that are being sold at the shop. The list includes details such as author, title, price, publisher and stock position. Whenever a customer wants a book the sales person inputs the title and the author and the system searches the list and displays whether it is available or not. If it is not an appropriate message is displayed, if it is then the system displays the book details and request for the number of copies are required, if the requested copies are available the total cost of the requested copies is displayed otherwise the message "required copies not in stock" is displayed. Write a program for the above in structures with suitable functions.
  13. Create a student data file (roll no., name, date of birth, rank) and code a program with options (use pointers & structures)
    1. Listing names, dob sorted on names
    2. Listing names, dob sorted on dob
    3. Listing names, dob sorted on names, dob
    1. Write a C program To copy the one file contents to the another file (using commandline arguments)
    2. Write a C Program to count the frequencies of words in a given file.