Programming for Problem Solving Lab Manual BCS-151 provides a comprehensive guide for B.Tech first-year students at United Institute of Technology, Prayagraj. This manual covers essential programming concepts in C, including arithmetic operations, number manipulation, and algorithm development. Students will find detailed instructions for writing programs to perform tasks such as checking for prime numbers, calculating factorials, and working with arrays and matrices. Ideal for beginners in computer science, this lab manual supports hands-on learning and practical application of programming skills.

Key Points

  • C programming exercises for first-year B.Tech students
  • Includes tasks like arithmetic operations and number swapping
  • Covers algorithms for prime checking and factorial calculations
  • Provides guidance on working with arrays and matrices
Soniya Kumari
7 pages
Language:English
Type:Lab Report
Soniya Kumari
7 pages
Language:English
Type:Lab Report
200
/ 7
UIT, PRAYAGRAJ B.TECH. 1
ST
YEAR
LAB CODE: BCS-151 Page 1
PROGRAMMING FOR PROBLEM
SOLVING LAB
BCS - 151
B.TECH. 1
ST
YEAR
United Institute of Technology, Naini, Prayagraj
(Dr. APJ Abdul Kalam Technical University, Lucknow)
D-3, UPSIDC Industrial Area, Naini, Prayagraj-211010
Website: www.united.ac.in
Name ______________________________
Roll No. ______________________________
Branch/Sem ______________________________
Session Odd Sem 2025-26
UIT, PRAYAGRAJ B.TECH. 1
ST
YEAR
LAB CODE: BCS-151 Page 2
STUDY AND EVALUATION SCHEME OF BCS-151
LABORATORY
Total No. of Periods : 2 Periods per week
EVALUATION:
INTERNAL MARKS : 50 MARKS
END SEMESTER EXAM : 50 MARKS
TOTAL MARKS : 100 MARKS
CREDIT : 1
UIT, PRAYAGRAJ B.TECH. 1
ST
YEAR
LAB CODE: BCS-151 Page 3
Program List
Prog. No.
Program List
1
WAP in C to perform basic arithmetic operations such as addition, subtraction,
multiplication, division and modulo division.
2
WAP in C to swap two numbers
a) using third variable
b) without using third variable
3
WAP in C to find the sum of digits of a
a) 3-digit number
b) 4-digit number
4
WAP in C to find the reverse of a
a) 3-digit number
b) 4-digit number
5
WAP in C to check whether a
a) number is odd or even
b) year is leap year or not
6
WAP in C to find the largest of
a) two numbers
b) three numbers
7
WAP in C to check whether a 3-digit number is Armstrong or not.
8
WAP in C check whether a number is palindrome or not for a
a) 3-digit number
b) 4-digit number
9
WAP in C to determine the roots of a quadratic equation.
10
WAP in C using conditional operators to
a) find the largest of two numbers
b) find the largest of three numbers
11
WAP in C using menu driven programming to find the area and perimeter of a
a) Rectangle
b) Square
c) Triangle using Heron’s formula
12
WAP in C using menu driven programming to find the volume of a
a) Cylinder
b) Cone
c) Sphere
13
WAP in C using menu driven programming to convert
a) Centigrade to Fahrenheit temperature
b) Fahrenheit to Centigrade temperature
14
WAP in C to find all Armstrong numbers between 100 and 999.
15
WAP in C to check whether a number is prime or not.
16
WAP in C to find all prime numbers between 1 to 100.
17
WAP in C to find the factorial of a number
a) using loops
b) using non-recursive function
/ 7
End of Document
200

FAQs

What programming tasks are included in the BCS-151 lab manual?
The BCS-151 lab manual includes a variety of programming tasks aimed at enhancing problem-solving skills using C. These tasks range from basic arithmetic operations, such as addition and subtraction, to more complex problems like finding the roots of a quadratic equation and checking for prime numbers. Additionally, students will work on tasks involving arrays, matrices, and string manipulation, ensuring a comprehensive understanding of fundamental programming concepts.
How is the evaluation structured for the BCS-151 lab course?
The evaluation for the BCS-151 lab course is structured into two main components: internal marks and an end semester exam. Each component is worth 50 marks, leading to a total of 100 marks for the course. This structure emphasizes both continuous assessment through internal evaluations and a final examination, allowing students to demonstrate their understanding of programming concepts and problem-solving skills.
What are some examples of programming exercises in the lab manual?
The lab manual contains a diverse set of programming exercises. For instance, students are required to write a program to swap two numbers using both a third variable and without it. Other exercises include finding the sum of digits of a number, checking if a number is odd or even, and determining if a year is a leap year. These exercises are designed to reinforce basic programming techniques and logical thinking.
What is the significance of using menu-driven programming in the lab manual?
Menu-driven programming is significant in the BCS-151 lab manual as it allows students to create interactive applications that enhance user experience. For example, students are tasked with developing programs to calculate the area and perimeter of geometric shapes, as well as to convert temperatures between Celsius and Fahrenheit using a menu interface. This approach not only improves programming skills but also emphasizes the importance of user interaction in software development.
How does the lab manual address sorting algorithms?
The lab manual addresses sorting algorithms by including exercises that require students to implement both Bubble Sort and Selection Sort. These tasks help students understand the fundamental concepts of sorting data, which is crucial in programming. By comparing the two algorithms, students can learn about their efficiencies and appropriate use cases, thereby enhancing their algorithmic thinking.
What types of patterns are students expected to print in the lab exercises?
Students are expected to print various patterns using nested loops in their programming exercises. Examples include simple star patterns, numeric sequences, and inverted patterns. These exercises help students practice control structures in C, reinforcing their understanding of loops and enhancing their ability to visualize and implement algorithms.
What is the purpose of the factorial program in the lab manual?
The factorial program included in the lab manual serves to demonstrate the concept of recursion and iterative processes in programming. Students are tasked with finding the factorial of a number using loops, non-recursive functions, and recursive functions. This exercise is crucial for understanding how different programming techniques can achieve the same outcome, thereby broadening their problem-solving skills.