C Language Programming Laboratory Work
INSTRUCTIONS TO STUDENTS FOR PREPARING
PROGRAMMING IN C LAB REPORT
This Lab Manual is prepared to help the students with their practical understanding and development of programming skills, and how to make practical files/ report.
Students have to submit Lab Exercise report, and can be collected back after the instructor/course coordinator after it has been checked and signed.
At the end of the session, students should compile all the Lab Exercise reports into a single report and submit during the end session.
The lab report to be submitted during the end session should include at least the following topics: –
1. Top Cover page – Sample page given below.
2. Index – Sample page given below
3. Each experiment should include:
– Title of the program
– Algorithm (optional):
It is a method of representing the step by step process or solution for solving a problem. Each step is called an instruction and written in sequence.
Characteristics of an algorithm are:
Finiteness:- It terminates with finite number of steps.
Definiteness:- Each step of algorithm is exactly defined.
Effectiveness:- All the operations used in the algorithm can be performed exactly in a fixed duration of time.
Input:- An algorithm must have an input before the execution of program begins.
Output:- An algorithm has one or more outputs after the execution of the program.
– Flowchart (optional): Design on Blank Sheet at Left side part of file
– Source Coding
– Output: Write Blank Sheet at Left side part of file
Note: The lab exercises may not be completed in a single specific lab. Students are encouraged to complete the programming questions given in the exercise prior to come to the lab hour and do the lab for the given programs.
Lab
C Language Programming Laboratory Work
1.) Write a C program read two integer number, perform all arithmetic operations.
2.) Write a C program read two real number find the sum of integer part and fractional part.
3.) Write a C Program Read three sides of triangle calculate area of triangle.
4.) Write a C program Read radius of a circle calculate area and circumference of circle.
5.) Write a C program read centigrade temperature convert into Fahrenheit temperature
6.) Write a C program calculate Simple and Compound interest.
7.) Write a C program read Total No of days find how many years, months and days.
8.) Write a c program read an integer number check whether it is even or odd using simple if.
9.) Write a C Program read the year form keyboard determine whether it is leap year or not leap year.
10.) Write a c program read three integer number calculate smallest number among these number.
11.) Write a C program read Roll_no, Name and three subject marks, calculate total, percentage and division and print all data in Marks sheet format.
12.) Write a C program read selling price and cost price determine loss or profit also calculate percentage loss or profit.
13.) Write a C program, which takes two integer operands and one operator from the user, performs the operation and then prints the result. (Consider the operators +, -, *, /, % and use switch statement.
14.) Write a C Program read month number from keyboard determine how many days in a month using switch statement.
15.) Write a C Program calculate root of quadratic equation and determine nature of roots Whether roots are equal/imaginary/real and different type.
16.) Write a C program to check whether a number is even or odd using ternary operator.
17.) Write a C Program read Percentage Marks from keyboard and determine grade with following criteria:(Using ?: operator)
Marks Grade
>=75 A
75 -65 B
55-65 C
50-55 D
<50 F
18.) Write a C Program to display and find the sum of n terms of Natural Number.
1 2 3 4 . . . . N terms
19.) Write a C Program to display and find the sum of n terms of Square Natural Number.
1 4 9 16. . . . N terms
20.) Write a C Program to display first n terms of fibonacci series:
0 1 1 2 3 5 8 . . . . N terms
21.) Write a C program to calculate factorial value of given integer.
22.) Write a C Program read an integer number from keyboard find the sum of digits
23.) Write a C Program read an integer number from keyboard check whether it is plaindrom or not palindrome.
24.) Write a C program to checking whether it is prime/composite number or not.
25.) Write a C program to finding number of primes less than n, n Z.
26.) Write a C program display multiplication tables in given range.
27.) Write a C program display following pattern on the screen.
28.) Write a C Program Read n integer numbers into array and find largest and smallest value.
29.) Write a C program to finding mean and standard deviation.
30.) Write a C Program read n values into list, display list in ascending order.
31.) Write a C Program read any string value from keyboard, check whether it is palindrome or not palindrome string.
32.) Write a C program to read text (multiple lines) and determine numbers of lines, words, alphabets and vowels in it.
33.) Write a C Program Read two strings values and swap it.
34.) Write a C Program to read two matrices with m x n order and find the addition of two matrices.
35.) Write a C Program to read two integer values find lcm and hcf (gcd) using function sub program.
36.) Write a C program to finding nPr, nCr for different n and r using function.
37.) Write a C program to calculate factorial value of given integer using recursive function.
38.) Define a structure type, struct employee that would contain emp name, date of joining, basic salary, dearness allowance(da), house rent allowance(hra), gross salary. Using this structure, write a program to read and calaulate da 154% of basic salary and hra 20% of basic salary and gross salary, display entire information on the screen.
39.) Write a C Program swap two integer variable’s value using pointer with function (use call by address)
40.) Write a C Program using pointer to read in an array of integers and print its elements in reverse order.
41.) Write a C Program to read any string value, copy string value into another string variable using function with pointer (no use library function).
42.) Write a C Program to design a structure student to contain name, date of birth and total marks obtained, read data for 5 students in a class and display using pointer.
43.) Write a C Program to read data from the keyboard, write it to a file called ‘file.txt’, again read the same data from the ‘file.txt’ file, and display it on the screen.
44.) Write a C Program to create a sequential file that could store details about five students. Details include roll_no, name, and three subject marks available and are provided through keyboard. Read the created file and calculate total, percentage and division and display entire information in suitable format.
45.) Write a Program read array’s values, find sum and display it using dynamic memory management techniques (function with pointer) (use malloc()/calloc() and free() function.)
You can also download the PDF from the given link :- Download PDF