Lab Journal 2021-22

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

1.

Develop a program to count number’s greater than, less than or equal to


a number ‘k’ in a array

2. Develop a program to merge the elements of two sorted arrays so that the
resulting array is also sorted.

3. Develop a program to print transpose of a given matrix.

4. Develop a program test whether a given matrix is an upper - triangular


matrix or not. An upper triangular Matrix is one in which all the elements
below its principal diagonal are 0.

5. Develop a program to Concatenate Two Strings and display the


concatenated string to the output screen.

6. Develop a program to compare two given strings using a function and


return 1 if the strings are equal and 0 otherwise. Display the appropriate
message to the output screen.

7. Develop a program to find the number of occurrences of each alphabet in


a given string and display the same to the output screen. Assume that the
string contain only alphabets.

8. Develop a program using a function to swap two numbers without using


temporary variable. Display the swapped numbers in the calling program.
(POINTERS)

9. Write a C program to accept & store N real numbers into an array. Find
their standard deviation using pointers and display it to the output screen.
(POINTERS)

10. Develop a program to reverse a string using pointers. Display the


reversed string to the console.(POINTERS)

PCS 251: LAB JOURNAL PROGRAMS

(SESSION: 2021-2022)
11. Develop a program to find total and average sales done by 'N' employees (empcode, emp name,
emp sales) using array of structures.

12. Develop a program to read and print set of name, roll number, date of birth and date of admission
of 'N' students in the college where date of birth and date of admission consists of three members such
as day, month, and year as a separate structure.

13. Write a program to create a file with three paragraphs. Display the contents and count the number
of vowels and consonants in the file. Display the count on the standard output.

14. Write a program to create a file and copy its contents to another file such that there is no space
between the words in the copied file. Display the contents of the newly copied file on the output screen.

15. Write a program in python to sum the numbers in a list containing numbers and strings.

16. Write a python program to read an entire text file and display each word on to the screen.

You might also like