Course Title: C Programming Lab Course code: 21BSDSC1P
Total Contact Hours: 42 Course Credits: 02
Formative Assessment Marks: 25 Duration of SEE/Exam: 03 Hours
Summative Assessment Marks: 25
Practice Lab
The following activities be carried out/ discussed in the lab during the initial period of the semester.
1. Basic Computer Proficiency
a. Familiarization of Computer Hardware Parts
b. Basic Computer Operations and Maintenance.
c. Do’s and Don’ts, Safety Guidelines in Computer Lab
2. Familiarization of Basic Software – Operating System, Word Processors, Internet Browsers,
Integrated Development Environment (IDE) with Examples.
3. Type Program Code, Debug and Compile basic programs covering C Programming
fundamentals discussed during theory classes.
Programming Lab
Part A:
1. Write a C Program to read radius of a circle and to find area and circumference
2. Write a C Program to read three numbers and find the biggest of three
3. Write a C Program to demonstrate library functions in math.h
4. Write a C Program to check for prime
5. Write a C Program to generate n primes
6. Write a C Program to read a number, find the sum of the digits, reverse the number and
check it for palindrome
7. Write a C Program to read numbers from keyboard continuously till the user presses 999
and to find the sum of only positive numbers
8. Write a C Program to read percentage of marks and to display appropriate message
(Demonstration of else-if ladder)
9. Write a C Program to find the roots of quadratic equation (demonstration of switch-case
statement)
10. Write a C program to read marks scored by n students and find the average of marks
(Demonstration of single dimensional array)
11. Write a C Program to remove Duplicate Element in a single dimensional Array
12. Program to perform addition and subtraction of Matrices
Part B:
1. Write a C Program to find the length of a string without using built in function
2. Write a C Program to demonstrate string functions.
3. Write a C Program to demonstrate pointers in C
4. Write a C Program to check a number for prime by defining isprime( ) function
5. Write a C Program to read, display and to find the trace of a square matrix
6. Write a C Program to read, display and add two m x n matrices using functions
7. Write a C Program to read, display and multiply two m x n matrices using functions
8. Write a C Program to read a string and to find the number of alphabets, digits, vowels,
consonants, spaces and special characters.
9. Write a C Program to Reverse a String using Pointer
10. Write a C Program to Swap Two Numbers using Pointers
11. Write a C Program to demonstrate student structure to read & display records of n
students.
12. Write a C Program to demonstrate the difference between structure & union.
Note: Student has to execute a minimum of 10 programs in each part to complete the Lab course.
0 Comments