C-Lab Syllabus PDF
C-Lab Syllabus PDF
C-Lab Syllabus PDF
Course Objectives
This course enables the students:
1. To learn computer language.
2. To Learn coding for problems.
3. To learn the problem-solving process through computer.
4. To know the limitations of system during program execution.
5. To know the practical application of various programming techniques.
Course Outcomes
After the completion of this course, students will be able:
CO1 To formulate simple algorithms for arithmetic and logical problems.
CO2 To translate the algorithms to programs.
CO3 To test and execute the programs and correct syntax and logical errors.
CO4 To apply programming to solve simple numerical method problems,
differentiation of function and simple integration.
CO5 To decompose a problem into functions and synthesize a complete program using
divide and conquer approach.
28
SYLLABUS
2. WAP in C to compute sinx = x – x3/3! + x5/3! – x7/7! ….. Continue adding successive
terms in the series until the value of the next term becomes smaller (in magnitude) than
10-5. Test the program for x = 1, x = 2, and x = 3. In each case display the number of
terms used to obtain the final answer.
3. WAP to generate every 3rd integer beginning with I = 2 and continue for all integers
that are less than 150. Calculate the sum of those integers that are evenly divisible by
5.
4. WAP to find whether a given year is a leap year or not. Modify it to generate a list of
leap years between two year limits given by user.
5. WAP to display the following pattern:
11
11 10 11
11 10 9 10 11
11 10 9 8 9 10 11
7. WAP to convert a decimal number into an equivalent number of the input base. Test
your program for base 2,8,10 & 16.
8. WAP to read a number n, and print it out digit-by-digit, as a series of words. For e.g.
123 would be printed as “one two three”.
9. WAP to check whether any input +ve integer is palindrome or not.
10. WAP to simulate a simple calculator (+ - / * %) that takes two operands and an operator
as input and displays the result.
11. WAP to find the GCD of two input +ve integer numbers.
12. WAP to swap the values of two variables without using a third variable.
13. Read a line of mixed text, and then write it out with all lower case and uppercase letters
reversed, all digits replaced by 0s and all other characters (non-letters and non-digits)
replaced by ‘*’.
14. WAP to find the product of two matrices A and B. Display the source matrices and
product matrix C in matrix format.
15. WAP to find whether a given matrix is a triangular matrix or not.
29
16. WAP to find the transpose of a matrix. Display the source and the transposed matrix in
matrix format.
17. Implement Prob. No. – 14 to 16 using functions for reading, manipulating and
displaying the corresponding matrices in matrix form.
18. WAP to sort a list of strings alphabetically using a 2-dim. Character array.
19. WAP to display the row sum and the column – sum of an input 2- dim. Matrix. Display
the source matrix with row and column sum.
20. Write a recursive function to calculate S = 2 + 4 + 6 + 8 + …… +2N. Implement the
function in a complete C program.
21. Write a function that accepts two arguments an array and its size n. It performs Bubble
up sort on the array elements. Using indirection operator ‘*’ implement this in a
complete C program. Display the source and the sorted array.
22. Using pointer, write a function that receives a character string and a character as
argument. Delete all occurrences of this character in the string. The function should
return corrected string with no holes.
23. Write a function for reading character string using pointer. Calculate the length of the
string (without using strlen ()). Finally print the string in reverse order, using pointer.
24. Implement prob. No. 14 using pointers representation of 2 – dim. array.
25. Implement prob. No. 15 using pointer representation of 2 dim. array.
26. Implement prob. No. 16 using pointer representation of 2 dim. array.
27. WAP to sort a list of strings into alphabetical order using array of pointers.
28. Create records of 60 students, where each record has fields-name, roll, gpa and fees.
Write a function update () to reduce the fees of those students who have obtained gpa
greater than 8.5 by 25% of the original fees. Write a complete program to exercise this
function in the main program and display all the records before and after updation.
29. Define a structure that describes a hotel. It should have members that include the name,
address, grade, average room charge and number of rooms. Write a function to perform
the following operations:
a) To print out hotels of a given grade in order of charges.
b) To print out hotels with room charges less than a given value.
30. WAP to concatenate the contents of two files into a third file.
31. WAP to copy the content of one file into another file. Names of both the files are to be
input as command line arguments
Books recommended:
TEXT BOOK
1. Jery R Hanly, “Problem solving and Program design in C”, Paerson Education, 7th
Edition. (T1)
2. Byron Gottfried, “Schaum's Outline of Programming with C”, McGraw-Hill. (T2)
3. E. Balaguruswamy, Programming in ANSI C, Tata McGraw-Hill. (T3)
4. R.G.Dromey, How to Solve it by Computer, Pearson Education. (T4)
REFERENCE BOOK
30
1. Brian W. Kernighan and Dennis M. Ritchie, “The C Programming Language”, Prentice
Hall India Learning Private Limited.(R1)
31
COURSE OUTCOME (CO) ATTAINMENT ASSESSMENT TOOLS &
EVALUATION PROCEDURE
Direct Assessment
Indirect Assessment –
1. Student Feedback on Faculty
2. Student Feedback on Course Outcome
32
MAPPING BETWEEN COURSE OUTCOMES AND PROGRAM OUTCOMES
33