This repository contains all you need for C Lab of KTU Semester 2 The program description are given below and you can open the corresponding program from the repository.
- 1.Area of the circle given the diameter
- 2.Area of the circle given the circumference.
- 3.Area of the circle given center point (x1,y1) and one point on the perimeter (x2,y2)
- 4.Area of a triangle given three sides a,b,c.( assume they form a triangle)
- 5.Area and perimeter of a right angled triangle given width(w) and height(h)
- 6.Volume and surface area of a sphere given the radius
- 7.Area of an equilateral triangle given one side (s)
- 8.Volume and surface area of the cylinder given radius(r) and height(h)
- 9.Volume and surface area of a cube given one side (s)
- 10.Hypotenuse of a right-angled triangle, given the length of the other two sides
- 11.Program to compare two numbers( a==b , a>b or b>a)
- 12.Program to check whether the given number is even or odd
- 13.Program to find the biggest of 3 numbers
- 14.Program to read internal marks( out of 50) and external mark( out of 100) and print passed /failed in internal or external ( use KTU criteria..45%) or failed in both
- 15.Program to check whether the given number is zero, positive or negative
- 16.Program to find the roots of a quadratic equation (ax^2+bx+c)
- 17.Program to check whether the given 3 sides form a triangle
- 18.Program to check the type of a triangle
- 19.Program to check the type of a triangle after reading the three vertices ( scalene, isosceles, equilateral)
- 20.Program to read a mark out of 100 and print the corresponding grade
- 21.Program to print the absolute value of a number
- 22.Program to check whether a given year is Leap Year or not
- 23.Program to check the quadrant of a given point(x,y)
- 24.Program to print the absolute value of a number without using the abs() function
- 25.Program to determine whether or not the triangle is a right triangle
- 26.Program to check whether the given coordinates form a triangle
- 27.Program to check whether a given alphabet is a capital or small letter
- 28.Program to check whether a number is divisible by 3 and 5
- 29.Program to find the biggest of 3 numbers ( use nested if)
- 30.Program to read the age and print the following ( use nested if)
age <18 Minor
age >=18 and age <45 eligible for vaccine in the second phase
age >=45 senior ..eligible for vaccine in the first phase. - 31.Program to print the month name corresponds to the month number and also print the number of days
- 32.Program to check whether the given number is odd or even
- 33.Program to read a character.If it is 'P' print Python.If it is 'J' print java.Print invalid character if it is any other character
- 34.Program to read a character and check for vowel
- 35.Program to create a simple calculator( +,-,*,/).Read the operator and two numbers and do the operation based on the operation
- 36.Program to write a menu driven program to compute area of a circle (option 1) or area of a triangle ( option 2) using switch statement
- 37.Program to print the even numbers between 0 and 50 (use while)
- 38.Program to print the odd numbers between 0 and 50 in the reverse order ( use while)
- 39.Program to print the series 5,10,15,….,100 (using for loop)
- 40.Program to generate the series 1, 2, 4 ,7, 11 ,16....n ( use while...read n)
- 41.Program to generate the Fibonacci series 0 1 1 2 3 5 8…..n ( use do while..read n)
- 42.Program to find the factorial of a number using for statement
- 43.Program to find the sum of the digits of a number and also print the no of digits
- 44.Program to check whether the given 3 digit number is an Armstrong number
- 45.Program to check whether the given number is prime or not
- 46.Program to write a C program to evaluate the series x-x^3/3!+x^5/5!-x^7/7!....n
- 47.Program to print the pattern
* * * * *
* * * *
* * *
* *
* - 48.Program to print all prime numbers in a given range
- 49.Program to print all Krishnamurti numbers in the given range
- 50.Program to find the average of list of numbers
- 51.Program to find the maximum and minimum values from an array of integers
- 52.Program to sort the numbers stored in array in ascending order.(bubble sort)
- 53.Program to remove duplicate elements from an array
- 54.Program to find the mean,variance and standard deviation of set of integer data.
- 55.Program to search a key element in a given array (linear search)
- 56.Program to check whether the given matrix is symmetric.
- 57.Program to check whether a given matrix is an identity matrix.
- 58.Program to calculate determinant of a 3 x 3 matrix.
- 59.Program to accept a two dimensional matrix and display the row sum, column sum and diagonal sum of elements.
- 60.Program to read a sentence through keyboard and to display the count of white spaces in the given sentence.(uq)
- 61.Program to count all the occurrence of a particular word.
- 62.Program to insert a word before a particular word.
- 63.Program to read a word and print the characters in alphabetical order.
- 64.Program to remove characters other than alphabet from a string
- 65.Program to add a string to the end of another string with out using library function.(concatenation-uq)
- 66.Write functions to convert feet to inches and inches to centimeters. Write a program which will read feet and convert it into centimeters using the two functions.(uq)
- 67.Program to write a function to find factorial of a given number.
- 68.Reading the admission number and name of N students and printing the roll list in the order of name.(university question)
- 69.A library database maintains following details of the book (bookid,name,author name,number of copies).Write a program to display the book details in the descending order of the number of copies available(university question)
- 70.Student data base store rno,name,gender and CGPA of students.Prepare a rank list .Also prepare a list of students with CGPA less than 7( university question).