College C assignments; nothing special 🤷
📚 Questions
Lab No. | Assignment | Program |
---|---|---|
LAB 1 | 1 | Write a program to calculate the area of triangle using formula at=√s(s-a)(s-b)(s-c) |
2 | Basic salary of an employee is input through the keyboard. The DA is 25% of the basic salary while the HRA is 15% of the basic salary. Provident Fund is deducted at the rate of 10% of the gross salary (BS+DA+HRA). Program to calculate the Net Salary. | |
3 | Write a program to determine the roots of quadratic equation. | |
4 | Write a program to find the largest of three numbers using nested if else. | |
5 | Write a program to receive marks of physics, chemistry & maths from user & check its eligibility for course ifa) Marks of physics > 40 b) Marks of chemistry > 50 c) Marks of math’s > 60 d) Total of physics & math’s marks > 150 or e) Total of three subjects marks > 200 |
|
LAB 2 | 6 | Write a program to find the value of y for a particular value of n. The a, x, b, n is input by user if n=1 y=ax%b if n=2 y=ax2+b2 if n=3 y=a-bx if n=4 y=a+x/b |
7 | Write a program to construct a Fibonacci series upto n terms. | |
8 | Write a program to find whether the number is Armstrong number. | |
9 | Write a program to generate sum of series 1!+2!+3!+--------------n! | |
10 | Write a program to find the sum of following series (1)-(x^1/1!)+(x^2/2!)-....(x^n/n)! |
|
LAB 3 | 11 | Write a program to print the entire prime no between 1 and 300. |
12 | Write a program to print out all the Armstrong number between 100 and 500. | |
13 | Write a program to draw the following figure:3 2 1 |
|
14 | Write a program to receive a five-digit no and display as like 24689: 2 4 6 8 9 |
|
LAB 4 | 15 | Write a function that return sum of all the odd digits of a given positive no entered through keyboard. |
16 | Write a program to print area of rectangle using function & return its value to main function. | |
17 | Write a program to calculate the factorial for given number using function. | |
18 | Write a program to find sum of Fibonacci series using function. | |
19 | Write factorial function & use the function to find the sum of series S=1!+2!+-----n!. | |
LAB 5 | 20 | Write a program to find the factorial of given number using recursion. |
21 | Write a program to find the sum of digits of a 5 digit number using recursion. | |
22 | Write a program to calculate the GCD of given numbers using recursion. | |
23 | Write a program to convert decimal number in to binary number. | |
24 | Write a program to convert binary number in to decimal number. | |
LAB 6 | 25 | Write a program to delete duplicate element in a list of 10 elements & display it on screen. |
26 | Write a program to merge two sorted array & no element is repeated during merging. | |
27 | Write a program to evaluate the addition of diagonal elements of two square matrixes. | |
28 | Write a program to find the transpose of a given matrix & check whether it is symmetric or not. | |
29 | Write a program to print the multiplication of two N*N (Square) matrix. | |
LAB 7 | 30 | Write a program in C to check whether the given string is a palindrome or not. |
31 | Write program to sort the array of character (String) in alphabetical order like STRING in GINRST. | |
32 | Write a program to remove all the blank space from the string & print it, also count the no of characters. | |
33 | Write a program to store the following string “zero”, “one” -------“five”. Print the no in words, given in figure as 3205. |
|
LAB 8 | 34 | Write a program to compare two given dates. To store a date uses a structure that contains three members namely day, month and year. If the dates are equal then display message equal otherwise unequal. |
35 | Define a structure that can describe a hotel. It should have the member that includes the name, address, grade, room charge and number of rooms. Write a function to print out hotel of given grade in order of room charges. |
|
36 | Define a structure called cricket with player name, team name, batting average, for 50 players & 5 teams. Print team wise list contains names of player with their batting average. | |
LAB 9 | 37 | Write a c program to copy & count the character content of one file says a.txt to another file b.txt. |
38 | Write a program to take 10 integers from file and write square of these integer in other file. | |
39 | Write a program to read number from file and then write all ‘odd’ number to file ODD.txt & all even to file EVEN.txt. | |
40 | Write a program to print all the prime number, between 1 to 100 in file prime.txt. | |
41 | Write the following C program using pointer: a) To sort the list of numbers through pointer b) To reverse the string through pointer. |
|
LAB 10 | 42 | Write a program to find the largest no among 20 integers array using dynamic memory allocation. |
43 | Using Dynamic Memory Allocation, Write a program to find the transpose of given matrix. | |
44 | Write a program to find the factorial of given number using command line argument. | |
45 | Write a program to find the sum of digits of a 5 digit number using command line argument |