Lab exam
Lab exam
Write a program to find whether the given year is a leap year or not.
Write a program that checks whether the two numbers entered by the user are equal or not.
Write a program to find the greatest of three numbers.
Write a program that finds whether a given number is even or odd.
Write a program that tells whether a given year is a leap year or not.
Write a program that accepts marks of five subjects and finds percentage and prints grades
according to the following criteria:
Between 90-100%-----Print ‘A’
80-90%-----------------Print ‘B’
60-80%-----------------Print ‘C’
Below 60%-------------Print ‘D’
Write a program that takes two operands and one operator from the user, perform the
operation, and prints the result by using Switch statement.
Write a program that inputs two arrays and saves the sum of corresponding elements of
these arrays in a third array and prints them.
1 Write a Program to print different data types in ‘C’ and their ranges.
2 Write a C program to find the sum and average of three numbers.
Write a program to swap the values of two variables with and without using the third
3
variable.
Write a Program to read radius value from the keyboard and calculate the area of circle and
4
print the result in both floating and exponential notation.
5 Write a program to find whether the given year is a leap year or not.
6 Write a program that checks whether the two numbers entered by the user are equal or not.
9 Write a program that tells whether a given year is a leap year or not.
Write a program that accepts marks of five subjects and finds percentage and prints grades
according to the following criteria:
10 Between 90-100%-----Print ‘A’
80-90%-----------------Print ‘B’
60-80%-----------------Print ‘C’
Below 60%-------------Print ‘D’
Write a program that takes two operands and one operator from the user, perform the operation, and prints
11
the result by using Switch statement.
14 Write a program to print sum of even and odd numbers from 1 to N numbers.
16 Write a program to check whether the entered number is prime or not using function
Write a program that simply takes elements of the array from the user and finds the sum of these elements
20
using function.
Write a program that inputs two arrays and saves the sum of corresponding elements of these arrays in a
21
third array and prints them.
22 Write a program to find the minimum and maximum element of the array.
24 Write a program to sort the elements of the array in ascending order using Bubble Sort technique.