KEMBAR78
PSC Lab Workbook | PDF | C (Programming Language) | Integer (Computer Science)
0% found this document useful (0 votes)
17 views126 pages

PSC Lab Workbook

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views126 pages

PSC Lab Workbook

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 126

23CSL101 – PROBLEM SOLVING USING C

LABORATORY WORKBOOK

Name

Roll No

Degree / Branch

Section

Semester I

Academic Year 2025-26(ODD)


23CSL101 – PROBLEM SOLVING USING C LABORATORY

Name :_

Class : _________________________________

Roll No : ___________________________________

Certified that this is bonafide record of work done by the above student of the

during the year ______________________________

Faculty In-Charge Head of the Department

Submitted for the End Semester Practical Assessment held on

Internal Examiner External Examiner


Dr. Mahalingam College of Engineering & Technology
23CSL101 – Problem Solving using C Laboratory
Rubrics for Laboratory Exercises

Needs
Criteria Excellent Good Satisfactory
Improvement

Marks: 20 Marks: 15 Marks: 10 Marks: 7

Preparation Procedure for Procedure for Procedure for


Procedure for
(20 Marks) implementation is implementation is implementation is
implementation is
clearly defined and clearly defined and partially defined
clearly defined and
meets almost all meets most of the and meets few
meets all requirements.
requirements. requirements. requirements.

Marks: 25 Marks: 20 Marks:15 Marks:10

Observation* Implementation Implementation Implementation Implementation


(25 Marks) addresses all addresses almost all addresses most of addresses few
requirements of the the requirements of requirements of the
requirements of the
problem statement. the problem problem statement.
problem statement.
statement.
Marks: 20 Marks: 15 Marks:10 Marks:7

Record* Successful Execution of few


Successful execution of Successful execution
(20 Marks) execution of most of test cases with
all test cases with of almost all test cases
the test cases with submission of
submission of record on with submission of
submission of record beyond the
time. record on time.
record on time. deadline.
Marks: 10 Marks: 8 Marks:5 Marks:3
Viva
Almost all the Most of the
(10 Marks) All the questions are Few questions are
questions are questions are
correctly answered. correctly answered.
correctly answered. correctly answered.

Total Marks 75 58 40 27
INDEX

Page Marks Faculty


S.No Date Title
No. (out of 75) Sign
1 Develop Algorithm, Flowchart and Pseudo
code for given problem.
2 Develop C programs using data types, I/O
statements, Operators and Expressions.
3 Develop C programs using Decision-making
constructs.
4 Implement C programs using looping
statements.
5 Design C programs to implement the concept
of arrays.
Design C programs to implement the concept
6 of strings.
7 Develop C programs using functions.

8 Develop C programs using pointers.

9 Implement the concept of structures using C.

10 Implement C programs to perform file


operations.
Average Mark
Signature of the Faculty
23CSL101 – PROBLEM SOLVING USING C LABORATORY

Ex.No: 1 Develop Algorithm, Flowchart and Pseudo code for given


Date: problem

AIM:

PROBLEMS:
1. Calculate simple interest.
2. Calculate sum and average of 5 subjects of a student.
3. Print the largest of 3 given numbers.
4. Determine whether a given year is a leap year.
5. Calculate factorial of a number.
6. Find the sum of N natural numbers.
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

RESULT:

Evaluation by faculty
Criteria Marks
Preparation /20
Program /25
Output and Result /20
Viva /10
Total /75
Faculty Signature with
Date
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

Ex.No: 2 Develop C programs using data types, I/O statements, Operators


Date: and Expressions

AIM:

PROBLEMS:
1. Read and display the Student ID(int), Cutoff(float), height(double), section of class(char) of a
student and print the memory occupied by each variable using size of operator.
2. A library charges ₹2 per day for the first 5 days, ₹3 per day for the next 5 days, and ₹5 per
day after 10 days. Read the number of late days (int) and compute fine (float).
3. Read weight (kg, float) and height (m, float). Calculate BMI using formula BMI = weight /
(height * height) and display result with 2 decimal precisions.
4. Find the greater number among two given numbers using ternary operator.
5. Read 2 integer inputs from the user and apply various logical and bitwise operators.
6. Evaluate the following expressions getting X and Y values from the user.
Exp1: (2*X-1)^2+Y
Exp2: X*Y+10*X/(7-Y)
Exp3: (4+(2^Y))*(X+1)/Y
Exp4: (19%5)*Y/X*2
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

RESULT:

Evaluation by faculty
Criteria Marks
Preparation /20
Program /25
Output and Result /20
Viva /10
Total /75
Faculty Signature with
Date
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

Ex.No: 3
Develop C programs using Decision-making constructs
Date:

AIM:

PROBLEMS:
1. Check given character is Vowel or consonant.
2. Check whether a number is divisible by 5 and 11 or by both.
3. Write a C program to input marks of five subjects Physics, Chemistry, Biology, Mathematics and
Computer, calculate percentage and grade according to given conditions:
If percentage >= 90% : Grade A
If percentage >= 80% : Grade B
If percentage >= 70% : Grade C
If percentage >= 60% : Grade D
If percentage >= 40% : Grade E
If percentage < 40% : Grade F
4. Develop a calculator application using switch-case.
5. Identify whether a given number is positive odd or positive even, negative odd or negative
even.
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

RESULT:

Evaluation by faculty
Criteria Marks
Preparation /20
Program /25
Output and Result /20
Viva /10
Total /75
Faculty Signature with
Date
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

Ex.No: 4
Implement C programs using looping statements.
Date:

AIM:

PROBLEMS:
1. Find sum of even numbers between m to n using for loop, where the values of m and n are
entered by the user.
2. Calculate power of a number raised by another number using while loop.
3. Find HCF of two numbers.
4. Calculate the factorial of a given number.
5. Reverse a given number.
6. Check if a number is prime.
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

RESULT:

Evaluation by faculty
Criteria Marks
Preparation /20
Program /25
Output and Result /20
Viva /10
Total /75
Faculty Signature with
Date
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

Ex.No: 5
Design C programs to implement the concept of arrays.
Date:

AIM:

PROBLEMS:
1. Find the sum of array elements.
2. Find the maximum element in an array.
3. Search an element in an array.
4. Perform selection sort in an array.
5. Perform addition of two matrices.
6. Print the sum of elements of each row in a matrix.
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

RESULT:

Evaluation by faculty
Criteria Marks
Preparation /20
Program /25
Output and Result /20
Viva /10
Total /75
Faculty Signature with
Date
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

Ex.No: 6
Design C programs to implement the concept of strings
Date:

AIM:

PROBLEMS:
1. Compare two strings using string library functions.
2. Count total number of vowel or consonant in a string.
3. Check whether a given substring is present in the given string.
4. Check whether a string is palindrome or not.
5. Find maximum occurring character in a string using loop.
6. Remove all vowels from a string.
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

RESULT:

Evaluation by faculty
Criteria Marks
Preparation /20
Program /25
Output and Result /20
Viva /10
Total /75
Faculty Signature with
Date
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

Ex.No: 7
Develop C programs using functions.
Date:

AIM:

PROBLEMS:
1. Find the square of any number using the function.
2. Find Sum of all Array Elements by passing array as an argument to function.
3. Swap two numbers using Call by value.
4. Interchange the value of two numbers using Call by reference.
5. Calculate factorial of a number using recursive function.
6. Calculate Sum of digits of a number using recursion.
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

RESULT:

Evaluation by faculty
Criteria Marks
Preparation /20
Program /25
Output and Result /20
Viva /10
Total /75
Faculty Signature with
Date
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

Ex.No: 8
Develop C programs using pointers.
Date:

AIM:

PROBLEMS:
1. Print the value and address pointed by a pointer.
2. Calculate the memory allocation for pointer variables to various datatypes.
3. Add two numbers pointed by pointers.
4. Find the sum of array elements by accessing the elements using pointers.
5. Find the minimum element in an array using pointers.
6. Perform various arithmetic operations on pointer variables.
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

RESULT:

Evaluation by faculty
Criteria Marks
Preparation /20
Program /25
Output and Result /20
Viva /10
Total /75
Faculty Signature with
Date
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

Ex.No: 9
Implement the concept of structures using C.
Date:

AIM:

PROBLEMS:
1. Develop a structure to store and print details of a student like name, age, cutoff and rollno.
2. Store details of 5 books (title, author, price) in an array of structures. Write a program to
display the book with the highest price.
3. Create structure for storing employee details with nested structure for salary details (basic,
HRA, allowances). Write a program to calculate and print the total salary for each employee.
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

RESULT:

Evaluation by faculty
Criteria Marks
Preparation /20
Program /25
Output and Result /20
Viva /10
Total /75
Faculty Signature with
Date
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

Ex.No: 10
Implement C programs to perform file operations.
Date:

AIM:

PROBLEMS:
1. Perform various File operations like open, read, write and close.
2. Count number of words, number of vowels, consonants, digits, white spaces in a given file.
3. Copy the contents of one file into another.
4. Count and display the number of characters and words in a file.
5. Display the source program as Output.
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY
23CSL101 – PROBLEM SOLVING USING C LABORATORY

RESULT:

Evaluation by faculty
Criteria Marks
Preparation /20
Program /25
Output and Result /20
Viva /10
Total /75
Faculty Signature with
Date
23CSL101 – PROBLEM SOLVING USING C LABORATORY

Workbook Completion Status

Date of Completion

Signature of the faculty

You might also like