[go: up one dir, main page]

0% found this document useful (0 votes)
47 views6 pages

C Programming Lab Assignments

Uploaded by

blackcreator420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views6 pages

C Programming Lab Assignments

Uploaded by

blackcreator420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

C Programming Lab Assignments

1. Write a C program to convert a given


temperature from Celsius to Fahrenheit and vice
versa.
2. Write a C program to calculate area and
perimeter of a circle.
3. Write a C program to read a character upper
case and print in lower case and vice versa.
4. Write a C program to exchange two numbers
(using a temporary variable and without using a
temporary variable).
5. Write a C program to find whether a given
number is even or odd.
6. Write a C program to check if one is eligible for
vote or not.
7. Write a C program to find maximum among
three input integers.
8. Write a C program to find if a given year is a leap
year or not.
9. Write a C program to read a character and then
determine if it is a vowel or consonant.
10. Write a C program to check the result of a
student in grade.
MARKS RANGE GRADE
Marks >= 90 O
80 <= Marks < 90 E
70 <= Marks < 80 A
60 <= Marks < 70 B
50 <= Marks < 60 C
Marks < 50 F

11. Write a C program to calculate the tax with


following condi ons :
Income Range Tax
0 to 500,000 0%
500,000 to 700,000 10%
700,000 to 1,000,000 20%
Above 1000,000 30%

12. Write a C program to calculate the roots of a


Quadra c Equa on.
13. Write a C program to make a simple calculator.
14. Write a C program to determine whether an
entered character is vowel or consonant using
switch case.
15. Write a C program to calculate the sum of first n
numbers e.g. sum = 1+2+3+…+n.
16. Write a C program to calculate the factorial of a
given number e.g. n! = 1*2*3*…*n.
17. Write a C program to calculate sum of all digits
of an input number.
18. Write a C program to Reverse the digits of a
given number.
19. Write a C program to count and print Leap Years
between a given range.
20. Write a C program to check if a number is prime
or not.
21. Write a C program to print the prime numbers
between a given range.
22. Write a C program to generate output same as
given below :
*
**
***
****
*****
23. Write a C program to generate output same as
given below :
*****
****
***
**
*
24. Write a C program to generate output same as
given below :
*
**
***
****
*****
****
***
**
*
25. Write a C program to generate output same as
given below :
ABCDEDCBA
ABCD DCBA
ABC CBA
AB BA
A A

26. Write a C program to convert a decimal number


into it’s equivalent binary number.
27. Write a C program to convert a binary number
into it’s equivalent decimal number.
28. Write a C program to calculate factorial of an
integer using recursion.
29. Write a C program to calculate GCD of two
numbers using recursion.
30. Write a C Program to generate Fibonacci series.
31. Write a C program to print the moves to solve
Tower of Hanoi.
32. Write a C program to create own header file and
Implement the same.
33. Write a C program to print the posi on and
value of the smallest and largest number in an
array.
34. Write a C Program to print the posi on and
value of 2nd large number from an array.
35. Write a C program to take user Input and display
a matrix using two dimensional array.
36. Write a C program to display transpose of a
matrix.
37. Write a C program to perform addi on and
subtrac on between two matrices.
38. Write a C program to perform mul plica on
between two matrices.
39. Write a C program implemen ng call by value
method of parameter passing.
40. Write a C program implemen ng call by
reference method of parameter passing.
41. Write a C program with a func on and passing
an En re Array as argument.
42. Write a C program to make and implemen ng a
func on named ‘mystrlen’ to calculate length of
a string.
43. Write a C program to make and implemen ng a
func on named ‘mystrcpy’ to copy a string.
44. Write a C program to make and implemen ng a
func on named ‘mystrcat’ to concatena on two
strings.
45. Write a C program to make and implemen ng a
func on named ‘mystrcmp’ to compare two
strings.
46. Write a C program to make and implemen ng a
func on named ‘mystrrev’ to reverse a string.

You might also like