Lab Experiments



C PROGRAMMING LAB EXPERIMENTS
CYCLE 1

1 . PRINTING ADDRESS
Aim:-Write a program to print your name and address.

2. TEMPERATURE CONVERSION
Aim:-Write a program to conversion of temperature from F to C and wise verse.

3. DIVISION OF PASS
Aim:-Write a program to find the grade of a student based on the mark secured in the 3 subjects.
Average mark
Grade
80 - 100
A
60 - 79
B
40 - 59
C
0 -39
D

4. FACTORIAL
Aim:-Write a program to find the factorial of a number.

5. SUM OF A SERIES
Aim:-Write a program to find the sum of given series
S= 1 + 2x2 + 3x3 + 4x +  .... 

6. ROOTS OF A QUADRATIC EQUATION
Aim:-Write a program to find the roots of a quadratic equation.

7.GREATEST OF THREE NUMBERS
Aim:-Write a program to find the greatest of 3 numbers.

 8.REVERSING A NUMBER
Aim:-Write a program to reverse the digit of a number.

 9.PRIME NUMBER
Aim:-Write a program to verify whether the given number is prime or not.

10. FIBONACCI SERIES
Aim:-Write a program to generate the Fibonacci series (0,1,1,2,3,5,8,…n.)

11. AMSTRONG NUMBER
Aim:-Write a program to check whether the given number is Amstrong or not.
(Examples; 3**3 + 7**3 + 1**3 = 371, 153 )

12. PRIME NUMBER SERIES
Aim:-Write a program to generate the prime numbers up to n.

13. LARGEST OF N NUMBERS
Aim:-Write a program to find the largest integer from an array of n numbers.

14. SUM OF EVEN NUMBERS
Aim:-Write a program to find the sum of even numbers in an array of n integers.

15.  ASCENDING ORDER SORTING

Aim; Write a program to sort a set of numbers in ascending order.


16. DESCENDING ORDER SORTING 

Aim: Write a program to sort a set of numbers in descending order.

17. OCCURRENCE OF A CHARACTER
Aim:-Write a program to find the occurrence of a character in a string.

18. COUNT OF VOWELS
Aim:-Write a program to finding the count of vowels in a string.

CYCLE II

1.       Write a program to compute nCr

2.       WAP to find the largest and smallest in a set of numbers using pointers.

3.       WAP to swap two numbers (i. Call by Value ii. Call by Reference )

4.       WAP to compare two strings for similarity (without using strcmp() function.).

5.       WAP to check a string is palindrome or not.

6.       WAP to find binary equivalent of a given decimal and viceversa.

7.       WAP to find the sum of two matrices.

8.      WAP to find the transpose of a matrix?

9.   WAP to find the product of two matrices

10. WAP to check for Identity matrix.

11.   Design a structure variable for storing roll number, name and grade of all students in a class. Output the details of students with grade A.

12.   Design a structure variable for storing employee number, name and salary of all employees in a company. Output the details of employee drawing the maximum salary.

No comments:

Post a Comment