0% found this document useful (0 votes)
53 views3 pages

Labppaper

The document contains a comprehensive list of programming tasks in C, ranging from basic calculations like distance between two points and breaking amounts into banknotes, to more complex operations such as matrix manipulations and structure handling. Each task includes specific input data and expected output, guiding the implementation of various algorithms and functions. The tasks cover a wide array of programming concepts including loops, conditionals, functions, and file handling.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views3 pages

Labppaper

The document contains a comprehensive list of programming tasks in C, ranging from basic calculations like distance between two points and breaking amounts into banknotes, to more complex operations such as matrix manipulations and structure handling. Each task includes specific input data and expected output, guiding the implementation of various algorithms and functions. The tasks cover a wide array of programming concepts including loops, conditionals, functions, and file handling.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1.a) Write a C program to calculate the distance between two points.

Test Data :
Input x1: 25 Input y1: 15 Input x2: 35 Input y2: 10
Expected Output: Distance between the said points: 11.1803
b) Write a C program to read an amount (integer value) and break the amount into the smallest possible number
of bank notes.
Test Data :
Input the amount: 375
Expected Output: There are: 3 Note(s) of 100.00 1 Note(s) of 50.00 1 Note(s) of 20.00 0 Note(s) of 10.00
1 Note(s) of 5.00 0 Note(s) of 2.00 0 Note(s) of 1.00
Note: The possible banknotes are 100, 50, 20, 10, 5, 2 and 1.

2a).Write a Program to find largest number in given three numbers using conditional operator.
b) Write a Program to print Compound interest

3a). write a program to find the area of a triangle using heron's formula
b). Write a Program to find the sum of digits of a given 4 digit number

4.a)Write a C program to print a block C using the hash (#), where the C has a height of six characters and width
of five and four characters.
######
## ##
#
#
#
#
#
## ##
######

b).Write a C program to compute the perimeter and area of a circle with a given radius.
Expected Output: Perimeter of the Circle = 37.680000 inches Area of the Circle = 113.040001 square inches

5.a)Write a Program to find largest number in given three numbers using conditional operator.
b). Write a Program to print Compound interest

6a)Write a c program to find the largest of 3 numbers using nested if


b)Write a C program to calculate the root of a quadratic equation.

7a) Write a C program to check whether an alphabet is a vowel or a consonant.


b) Write a program in C to calculate and print the electricity bill of a given customer. The customer ID, name, and
unit consumed by the user should be captured from the keyboard to display the total amount to be paid to the
customer. If bill exceeds Rs. 400 then a surcharge of 15% will be charged and the minimum bill should be of Rs.
100/-
8a).Write a C program to read any day number in integer and display the day name in word format using switch
statement
b) Write a C program to find the area of a circle using Macros

9. Write a C program to display a pattern like a right angle triangle with a number.
The pattern like :
1
12
123
1234

10.. Write a program in C to display the n terms of a harmonic series and their sum.
1 + 1/2 + 1/3 + 1/4 + 1/5 ... 1/n terms

11. Write a program in C to find the sum of the series [ x - x^3 + x^5 + ......].

12. Write a C program to check whether a given number is an Armstrong number or not using do while loop

13. Write a C program to determine whether a given number is prime or not using while oop

14. Write a program in C to display the first n terms of the Fibonacci series using for loop

15. Write a program in C to display a given number is palindrome or not.

17. Write a program in C to convert a decimal number into binary

18. Write a C program to convert a binary number into a decimal number

20.Write a C program to add two strings and print the resultant string in reverse order.

21. Write a program in C to copy the elements of one array into another array.
23Write a program in C to merge two arrays of the same size

22 Write a program in C to sort the elements of the array in descending order.

23.. Write a program in C to find the second largest element in an array.

24. Write a program in C for adding two matrices of the same size.

25.. Write a program in C for the subtraction of two matrices.

26. Write a program in C to find the transpose of a given matrix.

27.reate a structure named "Employee" to store employee details such as employee ID, name, and salary. Write a
program to input data for10 employees using array .Ffind the highest salary employee, and display their
information.

28.Create a structure called "Student" with members name, age, and total marks. Dob Write a C program using
nested structure read date for dob and input data for two students, display their information.
29 Design "Car" to store details like car ID, model, and rental rate per day named "Car" to store details like car ID,
model, and rental rate per day.Write a c program using unions read and display the information

30. Write a program in C to swap two numbers using 4 types of function calls
31. Write a C program to find the multiplication of two matrices using function

32. Write a c program to demonstrate how to pass and return a structure from function

33.Write a c program using different storage classes

34. Write a c program to find the factorial of a given number using recursion

35.Write a C program to demonstrate the passing the parameters using call by value and call by reference

36.Write a program in C to demonstrate the use of the &(address of) and *(value at address) operators.
37 Write a C program to demonstrate self referential structures

38. Write a program in C to store n elements in an array and print the elements using a pointer.

39. Write a c Program to write and read the text file

You might also like