**PPS LAB: Detailed List of Programs in C Language**

**(WAP-Write a Program)**

- WAP to Display message
- WAP to find Addition , Subtraction , Multiplication , Division , Remainder of two numbers
- WAP to find Area and Perimeter of Rectangle
- WAP to find Area and Perimeter of square
- WAP to find Area and Perimeter of triangle
- WAP to find Area and Perimeter of circle
- WAP to find Area and Volume of sphere
- WAP to find Curved Surface Area & Total Surface Area and Perimeter of cone
- WAP to find Curved Surface Area and Total Surface Area and Volume of cylinder
- WAP to swap two numbers
- WAP to find Minimum and Maximum of 2 no.
- WAP to find Minimum and Maximum of 3 no.
- WAP for Leap year checking
- WAP to find Total , percentage grade of student
- WAP to Check a no. for even or odd
- WAP to calculate discount based on given condition
- WAP to convert temperature from Celsius to Fahrenheit or vice versa depending on your choice
- WAP to Enter 3 sides and check wheather a triangle is possible or not?
- WAP to Enter 3 angles and check wheather a triangle is possible or not?
- WAP to find Roots of Quadratic equation
- WAP to Enter 3 sides and tell type of triangle : equilateral , isosceles , scalene
- WAP to Enter 3 angles and tell type of triangle: right angle , acute or obtuse
- WAP to Calculate area and perimeter based on choice
- WAP to Check a character whether it is vowel or consonant
- WAP to Print day of week by using day no.
- WAP to Print month of year by using month no.
- WAP to print 1 to 10 using loops
- WAP to print 10 to 1 using loops
- WAP to print even numbers between 1 to 10
- WAP to print even numbers between 10 to 1
- WAP to print a to b
- WAP to find the sum of first n natural numbers. S
_{n}=1+2+3+4+……………+n - WAP to find the factorial/product of first n natural numbers. P
_{n}=fact(n)= 1*2*3*4*……………*n - WAP to find the sum of squares of first n natural numbers
- WAP to find the sum of cubes of first n natural numbers
- WAP to find the sum of digits of a number
- WAP to find the reverse of a number
- WAP to check whether a number is palindrome or not?
- WAP to check whether a number is prime or not?
- WAP to check whether a number is perfect or not?
- WAP to check whether a number is armstrong number or not?
- Write a function to generate Pascal’s triangle.
- WAP to enter and display an array.
- WAP to find the sum of elements of an array.
- WAP to find the average of elements of an array.
- WAP to find the product of elements of an array.
- WAP to find the minimum of array elements.
- WAP to find the maximum of array elements.
- WAP to enter and display the elements of a 2-Dimensional Array
- WAP to find the sum of elements of 2-Dimensional Array
- WAP to find the average of elements of 2-Dimensional Array
- WAP to find the product of elements of 2-Dimensional Array
- WAP to find the minimum of 2-D array elements.
- WAP to find the maximum of 2-D array elements .
- WAP to enter the elements of two matrices and add these two matrices..
- WAP to enter the elements of two matrices and subtract these two matrices..
- WAP to enter the elements of two matrices and multiply these two matrices.
- WAP to enter the elements of a matrix and transpose this matrix.
- WAP to find an item in the array using linear search.
- WAP to find an item in the array using binary search.
- WAP to sort the array in ascending order using bubble sort.
- WAP to sort the array in ascending order using insertion sort.
- WAP to sort the array in ascending order using quick sort.
- WAP to find the length of a string.
- WAP to copy one string into another string.
- WAP to concatenate one string into another string.
- WAP to enter and compare two strings.
- WAP to generate the Fibonacci series.
- WAP to call a function using Call by Value Method
- WAP to call a function using Call by Reference Method

**B. Tech. Semester – I/II (Common to all Branches**)

**KU SYLLABUS**

**ES-107LA** PROGRAMMING FOR PROBLEM SOLVING LAB.

**CATEGORY : ENGINEERING SCIENCE COURSE**

**ES-107LA**PROGRAMMING FOR PROBLEM SOLVING LAB.

- Write a program to find the sum of individual digits of a positive integer.
- Write a program to generate the first n terms of the Fibonacci sequence.
- Write a program to generate all the prime numbers between 1 and n, where n is the input value given by the user.
- Write a program to find the roots of a quadratic equation.
- Write a function to generate Pascal’s triangle.
- Write a program for addition of Two Matrices
- Write a program for calculating transpose of a matrix.
- Write a program for Matrix multiplication by checking compatibility
- Write programs to find the factorial of a given integer by using both recursive and non-recursive functions.
- Write a function that uses functions to perform the count the lines, words and characters in a given text.
- Write a program to explores the use of structures, union and other user defined variables
- Write a program to print the element of array using pointers
- Write a program to implement call by reference
- Write a program to print the elements of a structure using pointers
- Write a program to read a string and write it in reverse order
- Write a program to concatenate two strings
- Write a program to check that the input string is a palindrome or not.
- Write a program which copies one file to another.
- Write a program to reverse the first n characters in a file.

**B. Tech. Semester – I/II (Common to all Branches**)

**DCRUST SYLLABUS**

**CSE103C PROGRAMMING FOR PROBLEM SOLVING LAB.**

**CATEGORY : ENGINEERING SCIENCE COURSE**

**The laboratory should be preceded or followed by one hour of tutorial to explain the approach or algorithm to be implemented for the problem given.**

**Tutorial 1: **Problem solving using computers:**Lab1:** Familiarization with programming environment**Tutorial 2:** Variable types and type conversions:**Lab 2:** Simple computational problems using arithmetic expressions**Tutorial 3:** Branching and logical expressions:**Lab 3:** Problems involving if-then-else structures**Tutorial 4:** Loops, while and for loops:**Lab 4:** Iterative problems e.g., sum of series**Tutorial 5:** 1D Arrays: searching, sorting:**Lab 5:** 1D Array manipulation**Tutorial 6:** 2D arrays and Strings**Lab 6:** Matrix problems, String operations**Tutorial 7:** Functions, call by value: **Lab 7:** Simple functions**Tutorial 8 &9:** Numerical methods (Root finding, numerical differentiation, numerical integration):**Lab 8 and 9:** Programming for solving Numerical methods problems**Tutorial 10:** Recursion, structure of recursive calls**Lab 10:** Recursive functions**Tutorial 11:** Pointers, structures and dynamic memory allocation

Lab 11: Pointers and structures**Tutorial 12:** File handling:**Lab 12:** File operations

**Course Outcomes:**

- To formulate the algorithms for simple problems
- To translate given algorithms to a working and correct program.
- To be able to correct syntax errors as reported by the compilers
- To be able to identify and correct logical errors encountered at run time
- To be able to write iterative as well as recursive programs
- To be able to represent data in arrays, strings and structures and manipulate them through a program
- To be able to declare pointers of different types and use them in defining self referential structures.
- To be able to create, read and write to and from simple text files.