modified lab list(12)
modified lab list(12)
Note:
1. Capitalize each word. / Be clear, informative & concise. / Avoid abbreviations,
2. Spacing------------> Double-space
3. Page Numbering-> Bottom of the page, center
5. Headings----------> Bold font on a separate line / No numbering for headings & subheadings
6. Paper--------------> A4 size, white, one-sided writing
7.Page margins----> Left 1.25”, Right 1”, Top 1”, Bottom 1”
8. Page Binding----> Spiral or hard stick
9. A4 size paper; white in color
10. Write on one side/front only; the back side must be blank.
You must write manually; computerized reports will not be accepted!
As you finish lab report one, repeat the same process for other reports.
Lab Work - 1 (Function)
1. WAP to find sum of two numbers using function named sum().
2. WAP to know a number is even or odd using function named evenodd().
3. WAP to print the greatest value among three numbers using a function int great().
We have to use return statement.
4. WAP to know a number is prime or composite using function.
5. WAP to find sum of series 1, 2, 3,…..200 using function.
Assume yourself function name. It returns an integer value.
6. WAP to input elements of an array and print them with their sum. Suppose, the array is one dimensional
and is of void type and function to be used is array_elements().
7. Suppose a function void matrix_sum(int a[][],int b[][]).Here, we have passed array as parameter. Use
this function to find sum of matrices.
8. WAP to sort ‘n’ number of strings using function. Pass strings as parameter.
9. WAP to find factorial value of a number using recursive function.
WAP to input 5 employees’ details with salary then print them. Use nested struct concept.
4. WAP to input id, name and address of 20 students using struct. Then print them in sorted format on the
basis of name.
5. WAP to input any 10 teacher’s id, name and subject using ‘typedef’ and structure. Then print them on
screen.
6. WAP using function and structure to calculate sum of two distances measured in terms of kilometers and
meters.
For example,
If we input following data
Kilometer meter
23 445
45 756
69 201
The output would be 69 km and 201 meters.
7. WAP to input student id, name and grade and print them. Use union concept.