LAB 1 List of Experiments
1. Write a C program to display “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.
(i) v=u+¿
5. Write C program to evaluate each of the following equations.
(ii) S=ut+1/2 g t2 iii) V 2=u 2+2 gs
6. 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.
Sample output:
Input your first name: Tom
Input your last name: Davis
Input your year of birth: 1982
Tom Davis 1982.
8. Write a program that converts Centigrade to Fahrenheit.
Expected Output:
Input a temperature (in Centigrade): 45
113.000000 degrees Fahrenheit.
9. C program to calculate the value of n C r
10. C program to extract the last two digits from a given year
LAB 2 List of Experiments
1.Write a program to find the following +, -, *, /, and %, between two
numbers.
2.Write a program to find the following a++, a--, ++a, and --a.
3.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);
b) result = (a == b) && (c < b);
c) result = (a == b) || (c < b);
d) result = (a != b) || (c < b);
e) result = !(a != b);
f) result = !(a == 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.