14 KCS151P 251P Prog For Prob Solving
14 KCS151P 251P Prog For Prob Solving
Vision of Institute
To be a leading educational institution recognized for excellence in engineering education & research producing globally
competent and socially responsible technocrats.
Mission of Institute
IM1: To provide state-of-the-art infrastructural facilities that support achieving academic excellence.
IM2: To provide a work environment that is conducive for professional growth of faculty & staff.
IM3: To collaborate with industry for achieving excellence in research, consultancy and entrepreneurship development.
Program Outcomes (POs)
Program Statement
Outcome
PO1 Engineering knowledge: Apply the knowledge of mathematics, science, engineering fundamentals,
and an engineering specialization to the solution of complex computer engineering problems.
PO2 Problem analysis: Identify, formulate, review research literature, and analyse complex computer
engineering problems reaching substantiated conclusions using first principles of mathematics, natural
sciences, and engineering sciences.
PO3 Design/development of solutions: Design solutions for complex computer engineering problems and
design system components or processes that meet the specific needs with appropriate considerations
for the public health and safety, and the cultural, societal, and environmental considerations.
PO4 Conduct investigations of complex problems: Use research-based knowledge and research methods
including design of experiments, analysis and interpretation of data, and synthesis of the information
to provide conclusions
PO5 Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modelling to complex engineering activities with an
understanding of the limitations
PO6 The engineer and society: Apply reasoning informed by the contextual knowledge to assess societal,
health, safety, legal and cultural issues and the consequent relevant to the professional engineering
practices
PO7 Environment and sustainability: Understand the impact of the professional engineering solutions in
societal and environmental contexts, and demonstrate the knowledge of, and need for sustainable
development
PO8 Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norm of
the engineering practices
PO9 Individual and team work: Function effectively as an individual, and as a member or leader in
diverse teams, and in multidisciplinary settings
PO10 Communications: Communicate effectively on complex engineering activities with the engineering
community and with society at large, such as, being able to comprehend and write effective reports
and design documentation, make effective presentations, and give and receive clear instructions
PO11 Project management and finance: Demonstrate knowledge and understanding of the engineering
and management principles and apply these to one’s own work, as a member and leader in a team, to
manage projects and in multidisciplinary environments.
PO12 Life-long learning: Recognize the need for, and have the preparation and ability to engage in
independent and life learning in the broadest context of technological change.
List of Experiments prescribed by Affiliating University
Teaching and Evaluation Scheme
Course Outcomes (CO’s)
CO-2 Write program using modular concepts, arrays, structures and looping
CO-3 Implement the file handling concepts using C program
Lab Plan|| Programming for Problem solving Lab (KCS-151P/251P)
||2021-22
2. Theme-2:Conditional Branching 1
3. Theme-3:Loop Constructs 2
4. Theme-4:Modular Programming 2
5. Theme-5:Arrays 2
6. Theme-6: Structures 2
8. Revision/Internal Practical/Viva/Quiz
Guidelines regarding lab work
You should attempt all problems/assignments given in the list session wise.
You may seek assistance in doing the lab exercises from the concerned lab instructor/Faculty In-charge. Since
the assignments have credits, the lab instructor is obviously not expected to tell you how to solve these, but
you may ask questions concerning the C language or a technical problem.
For each program you should add comments (i.e. text between /* ... */ delimiters) above each function in the
code, including the main function. This should also include a description of the function written, the purpose
of the function, meaning of the argument used in the function and the meaning of the return value (if any).
The program should be interactive, general and properly documented with real Input/ Output data.
If two or more submissions from different students appear to be of the same origin (i.e. are variants of
essentially the same program), none of them will be counted. You are strongly advised not to copy somebody
else's work.
It is your responsibility to create a separate directory to store all the programs, so that nobody else can read or
copy.
Lab record is compulsory.
The list of the programs (list of programs given at the end, session-wise) is available to you in this lab
manual. For each session, you must come prepare with the algorithms and the programs written in the
Observation Book.
You should utilize the lab hours for executing the programs, testing for various desired outputs and
enhancements of the programs.
As soon as you have finished a lab exercise, contact one of the lab instructor / in charge in order to get the
exercise evaluated and also get the signature from him/her on the Observation book.
Completed lab assignments should be submitted in the form of a Lab Record in which you have to write the
algorithm, program code along with comments and output for various inputs given.
The total no. of lab sessions are 8 and the list of assignments is provided session-wise. It is important to
observe the deadline given for each assignment.
LIST OF EQUIPMENTS / MACHINES ETC. || PROGRAMMING FOR PROBLEM SOLVING
LAB (KCS-151P/251P) || 2021-22
https://www.tutorialspoint.com/cprogramming/
https://www.codechef.com/c-programming
http://www.cprogramming.com/
https://www.codeproject.com
Some open source online compiler to conduct the C lab are as follows:
1. https://www.jdoodle.com/c-online-compiler/
2. https://www.tutorialspoint.com/compile_c_online.php
3. https://www.programiz.com/c-programming/online-compiler/
4. https://www.hackerrank.com/
LAB LAYOUT|| PROGRAMMING FOR PROBLEM SOLVING LAB (KCS-151P/251P) || 2020-21
E-207
Sample Quiz
CO 1:
CO 2:
1. Explain the syntax for for loop.
2. What is the meaning of base address of the array?
3. What is the difference between actual and formal parameters?
4. Can a program be compiled without main() function?
5. What is a nested structure?
6. Explain modular programming.
7. What are the different ways of passing parameters to the functions? Which to use when?
8. Describe the file opening mode “w+”.
CO 3:
2. Theme-2:Conditional Branching 1
3. Theme-3:Loop Constructs 2
4. Theme-4:Modular Programming 2
5. Theme-5:Arrays 2
6. Theme-6: Structures 2
8. Revision/Internal Practical/Viva/Quiz
CO1: Write program for arithmetic and logical problems
Experiment No. 1
Theme General Programs
Students are required to 1. Objective
implement/execute/draw/make document 2. Logic
3. Algorithm
4. Program Code
5. Output Window
List of Programs to be implemented 1. Write a program to calculate the area of triangle using formula
at=√s(sa)(s-b) (s-c)
2. Basic salary of an employee is input through the keyboard. The DA is
25%of the basic salary while the HRA is 15% of the basic salary.
ProvidentFund is deducted at the rate of 10% of the gross salary
(BS+DA+HRA). Program to calculate the Net Salary.
Experiment No. 2
Theme Conditional Branching
Students are required to 1. Objective
implement/execute/draw/make document 2. Logic
3. Algorithm
4. Program Code
5. Output Window
List of Programs to be implemented 1. Write a program to determine the roots of quadratic equation.
2. Write a program to find the largest of three numbers using nested
if else.
3.Write a program to receive marks of physics, chemistry & maths
from user& check its eligibility for course if
a) Marks of physics > 40
b) Marks of chemistry > 50
c) Marks of math’s > 60
d) Total of physics & math’s marks > 150
e) Total of three subjects marks > 200.
4. Write a program to find the value of y for a particular value of n.
The a, x, b, n is input by user
if n=1 y=ax%b
if n=2 y=ax2+b2
if n=3 y=a-bx
if n=4 y=a+x/b
CO2: Write program using modular concepts, arrays, structures and looping
Experiment No. 3
Theme Loop Construct
Students are required to 1. Objective
implement/execute/draw/make document 2. Logic
3. Algorithm
4. Program Code
5. Output Window
List of Programs to be implemented 1. Write a program to construct a Fibonacci series upto n terms.
2. Write a program to find whether the number is Armstrong number.
3. Write a program to generate sum of series 1!+2!+3!+--------------n!
4. Write a program to find the sum of following series 1-X1/1!+X2/2!-
…………Xn/n!.
5. Write a program to print the entire prime no between 1 and 300.
6.Write a program to print out all the Armstrong number between 100 and
500.
7. Write a program to draw the following figure:
321
21
1
*
**
***
8.Write a program to receive a five-digit no and display as like 24689:
2
4
6
8
9
Experiment No. 4
Theme Modular Programming
Students are required to 1. Objective
implement/execute/draw/make document 2. Logic
3. Algorithm
4. Program Code
5. Output Window
1. Write a function that return sum of all the odd digits of a given
positive no. entered through keyboard.
2. Write a program to print area of rectangle using function & return
its value to main function.
3. Write a program to calculate the factorial for given number using
function.
List of Programs to be implemented 4. Write a program to find sum of Fibonacci series using function.
5. Write factorial function & use the function to find the sum of
series S=1!+2!+-----n!.
6. Write a program to find the factorial of given number using
recursion.
7. Write a program to find the sum of digits of a 5 digit number
using recursion.
8. Write a program to calculate the GCD of given numbers using
recursion.
9. Write a program to convert decimal number in to binary number.
10. Write a program to convert binary number in to decimal number.
Experiment No. 5
Theme Arrays
Students are required to 1. Objective
implement/execute/draw/make document 2. Logic
3. Algorithm
4. Program Code
5. Output Window
Experiment No. 6
Theme Structures
Students are required to 1. Objective
implement/execute/draw/make document 2. Logic
3. Algorithm
4. Program Code
5. Output Window
Experiment No. 7
Theme Application of Pointers
Students are required to 1. Objective
implement/execute/draw/make document 2. Logic
3. Algorithm
4. Program Code
5. Output Window