Course Name: C Programming Laboratory
Course Code: 21CPL18/28
Course Objectives:
1. Explain problem statements and identify appropriate solutions.
2. Demonstrate the use of IDE, C Compiler, and identify and rectify the syntax and syntactic errors during programming.
3. Development of algorithms and programs using constructs of C programming language.
4. Reporting the observations.
Course Syllabus
Practise Programs
Calculation of Simple Interest,
Check whether the given number is even or odd
Convert string case
Check for palindrome, prime number, perfect square.
Development of linear search algorithm Etc…
PART A – List of problems for which student should develop program and execute in the Laboratory
1 Simulation of a Simple Calculator.
2 Compute the roots of a quadratic equation by accepting the coefficients. Print appropriate messages.
3 An electricity board charges the following rates for the use of electricity: for the first 200 units 80 paise per unit: for the next 100 units 90 paise per unit: beyond 300 units Rs 1 per unit. All users are charged a minimum of Rs. 100 as meter charge. If the total amount is more than Rs 400, then an additional surcharge of 15% of total amount is charged. Write a program to read the name of the user, number of units consumed and print out the charges.
4 Implement Binary Search on Integers / Names.
5 Implement Matrix multiplication and validate the rules of multiplication.
6 Compute sin(x)/cos(x) using Taylor series approximation. Compare your result with the built-in library function. Print both the results with appropriate inferences.
7 Sort the given set of N numbers using Bubble sort.
8 Write functions to implement string operations such as compare, concatenate, string length. Convince the parameter passing techniques.
9 Implement structures to read, write and compute average- marks and the students scoring above and below the average marks for a class of N students.
10 Develop a program using pointers to compute the sum, mean and standard deviation of all elements stored in an array of N real numbers.
11 Implement Recursive functions for Binary to Decimal Conversion.
PART B – Practical Based Learning
A problem statement for each batch is to be generated in consultation with the co-examiner and student should develop an algorithm, program and execute the program for the given problem with appropriate outputs.
Course Outcomes (Course Skill Set):
At the end of the course the student will be able to:
1. Recall the problem statement and identify the need for computer programming
2. Use C compiler, IDE for programming, identify and correct the syntax and syntactic errors in programming
3. Develop algorithms and write programs to solve the problems
4. Select the appropriate C language constructs and identify methods necessary for effective programs.
5. Document the inference and observations made from the implementation.
Suggested Learning Resources:
1. YashavanthKanetkar, Let us C, Authentic Guide to C Programming Langauge, bpb publisher, 17th Edition, 2020.
2. Herbert Schildt, C: The complete reference, McGraw Hill, 4th Edition, 2017
3. Programming in C , ReemaTheraja
Web links and Video Lectures (e-Resources):
1. http://elearning.vtu.ac.in/econtent/courses/video/BS/14CPL16.html
2. https://nptel.ac.in/courses/106/105/106105171/