LAB 1 List of Experiments
Q1. Write a C code for This is my first C Program
2. Write a C program that prints the perimeter of a rectangle to take its height and width as input.
3. Write a C program to calculate area and circumference of a circle.
4.Write a C program to perform addition, subtraction, division and multiplication of two numbers.
5. Write C program to evaluate each of the following equations. (i) 𝑣 = 𝑢 + 𝑔T
(ii) 𝑆 = 𝑢𝑡 + 1/2𝑔𝑡 2
iii) 𝑉 2 = 𝑢 2 + 2𝑔T^2
Q6. Write a C program that takes hours and minutes as input, and calculates the total number of
minutes.
7. Write a program in C that reads a forename, surname and year of birth and display the names and
the year one after another sequentially.
8. Write a program that converts Centigrade to Fahrenheit
Q9.program to calculate the value of 𝑛𝐶r
10. C program to extract the last two digits from a given year.
LAB 2 List of Experiment
1.Write a program to find the following +, -, *, /, and %, between two numbers.
Q2. 2.Write a program to find the following a++, a--, ++a, and --a.
Q3.Write a program to find the following a += b, a -= b, a *= b, a /= b, a %= b between two numbers.
4.Write a program to check whether two number are ==, , >=, <=, and !=.
5.Write a program to find the following result. int a = 5, b = 5, c = 10, result; a) result = (a == b) && (c
> b);
6. Write a program to find the following &, >>, <<, |, ~,^ between two numbers.
7. Write a program to find the size of the following data types int, float, char, string, long int, double,
long float
LAB 3 List of Experiment
Q1. Write a program, where take the input from getchar and print that input using printf.
Q2. Write a program, where take the input from scanf and print that input using printf.
Q3. Write a program to typecaste from integer to float.
Q4 . Write a program to typecaste from float to Integer.
Q5. Write a program to demonstrates the automatic binary type conversion.
Q6. Write a program to demonstrates the assignment type conversion.
Q7. Write a program to demonstrates the associativity and precedence of operator
LAB 4 List of Experiment
1. Write a C program to check whether a given number is even or odd.
2. Write a C program to find whether a given year is a
leap year or not.
3. Write a C program to read the age of a candidate and
determine whether it is eligible for casting his/her own
vote.
4. Write a C program to find the largest of three
numbers.
5. Write a C program to accept a coordinate point in a
XY coordinate system and determine in which quadrant
the coordinate point lies.
6. Write a C program to check whether a triangle is
Equilateral, Isosceles or Scalene.
7. Write a C program to check whether an alphabet is a
vowel or consonant.
8. Write a C program to read roll no, name and marks of
three subjects and calculate the total, percentage and
division.
LAB 4 List of Experiment-
part 2
1. Print set of even number from 1 to 20 using
continue.
2. Print set of prime number from 1 to 30 using
continue.
3. Print set of odd number from 1 to 20 using
continue.
4. Write a program in C to make such a pattern like
right angle triangle with number increased by 1
using break. The pattern like:
1
23
456
7 8 9 10
5. Write a program in C to make such a pattern like a
pyramid with an asterisk using break.
*
**
***
****
6. Write a C program to print day of week name using
switch case.
7. Write a C program to check whether an alphabet is
vowel or consonant using switch case.
LAB 5 List of Experiment-
1. Write a program in C to display the first 10 natural numbers.
2. Write a program in C to display the cube of the number up to given an integer.
3. Write a program in C to display the n terms of odd natural number and their sum
4. Write a program in C to display the pattern like right angle triangle
with a number. The pattern like:
5. Write a program in C to make such a pattern like right angle triangle with a number which
will repeat a number in a row. The pattern like: 1 22 333 4444
6.Write a program in C to display the pattern like a diamond.
6. Write a C program to display Pascal's triangle. Test Data: Input number of rows: 5
LAB 6 List of Experiment
1. Write a program in C to find the square of any number using the function
2. Write a program in C to swap two numbers using function
3. Write a program in C to check a given number is even or odd using the function.
4. Write a program in C to convert decimal number to binary number using the function.
5. Convert a binary number to decimal and vice-versa
6. Convert an octal Number to decimal and vice-versa
7. Convert a binary number to octal and vice-versa
8. Write a C program to find maximum and minimum between two numbers using functions.
9. Write a C program to print all perfect numbers between given interval using function
LAB 7 List of Experiment
1. Write a C program to find power of any
number using recursion.
2. Write a C program to print all natural numbers
between 1 to n using recursion.
3. Write a C program to print all even or odd
numbers in given range using recursion.
4. Write a C program to find sum of all natural
numbers between 1 to n using recursion.
5. Write a C program to find sum of all even or
odd numbers in given range using recursion.
6. Write a C program to find reverse of any
number using recursion.
7. Write a C program to check whether a number
is palindrome or not using recursion.
8. Write a C program to find sum of digits of a
given number using recursion.
9. Write a C program to find factorial of any
number using recursion.
10. Write a C program to generate nth Fibonacci
term using recursion.
LAB 8 List of Experiment
1. Write a program in C to store elements in an array and print it.
2. Write a program in C to read n number of values in an array and display it in reverse order.
3. Write a program in C to find the sum of all elements of the array.
4.Write a program in C to copy the elements of one array into another array.
5. Write a program in C to find the maximum and minimum element in an array.
6. Write a program in C to separate odd and even integers in separate arrays.
7. Write a program in C to count a total number of duplicate elements in an array.
8. Write a program in C to print all unique elements in an array.
9. Write a program in C to count the frequency of each element of an array.
10. Write a program in C to find the second largest element in an array.
MOCK TEST
1. Write a program to print the following pattern.
2. Write a program to print sum of n prime number:
Sample Input:
Sample output:
Sample Input:
4
3.Write a program in C to convert decimal number to binary number using the function.