0% found this document useful (0 votes)
6 views

Lab exam

The document outlines a series of programming tasks in C, including printing data types and their ranges, calculating sums and averages, swapping variable values, and determining leap years. It also covers array operations such as finding sums, searching, and sorting, as well as implementing mathematical functions like factorial and Fibonacci series. The tasks are designed to enhance programming skills through practical applications of C language concepts.

Uploaded by

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

Lab exam

The document outlines a series of programming tasks in C, including printing data types and their ranges, calculating sums and averages, swapping variable values, and determining leap years. It also covers array operations such as finding sums, searching, and sorting, as well as implementing mathematical functions like factorial and Fibonacci series. The tasks are designed to enhance programming skills through practical applications of C language concepts.

Uploaded by

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

Write a Program to print different data types in ‘C’ and their ranges.

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
variable.
Write a Program to read radius value from the keyboard and calculate the area of circle and
print the result in both floating and exponential notation.

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 to print the sum of all numbers up to a given number.


Write a program to find the factorial of a given number.
Write a program to print sum of even and odd numbers from 1 to N numbers.
Write a program to print the Fibonacci series.
Write a program to check whether the entered number is prime or not using function
Write a program to find the reverse of a number using a function.
Write a program to print Armstrong numbers from 1 to 100 using a function.
Write a recursive function to calculate the factorial of a given number.
Write a program that simply takes elements of the array from the user and finds the sum of
these elements using function.

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.

7 Write a program to find the greatest of three numbers.

8 Write a program that finds whether a given number is even or odd.

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.

12 Write a program to print the sum of all numbers up to a given number.

13 Write a program to find the factorial of a given number.

14 Write a program to print sum of even and odd numbers from 1 to N numbers.

15 Write a program to print the Fibonacci series.

16 Write a program to check whether the entered number is prime or not using function

17 Write a program to find the reverse of a number using a function.

18 Write a program to print Armstrong numbers from 1 to 100 using a function.

19 Write a recursive function to calculate the factorial of a given number.

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.

23 Write a program to search an element in an array using Linear Search.

24 Write a program to sort the elements of the array in ascending order using Bubble Sort technique.

25 Write a program to add and multiply two matrices of order n x n.

You might also like