Module Bank 2 PC
Module Bank 2 PC
1. Write a program to read ‘n’ elements in an array and perform the following operations.
a) Sort the array elements in ascending order.
b) Sort the array elements in descending order.
c) Print the array elements in reverse order.
d) Find the even and odd numbers and move them into separate arrays named as Even []
and Odd [] respectively.
2. Develop a C program to create a one dimensional array of size n and initialize the
array elements during run time. For this array,
a) print the list of Prime numbers in the array.
b) print the list of Perfect numbers in the array.
c) Replace the alternate positions of the array elements with ‘1’ and print them.
d) Insert an element k in pth position.
e) Delete the element in pth position
3. Write a program that reads N data elements in an array and perform the following
operations.
a) Find the frequency of each element of an array.
b) Delete the duplicate array elements and print the new array elements.
c) ‘n’ times Left Rotate the elements of an array.
d) Read two arrays and Swap them.
6. Design a program to determine the No of Vowels in the string, convert the string from
lower case to uppercase and also Display alternate characters in string.
7. Write a program to read user entered names list of a class in vignan university and do the
following operations
a) Find maximum and minimum lengthy names.
b) List out the duplicate names from a given list of nominal rolls of a class.
c) Sort the names in alphabetical order
9. In first year of Vignan university there are n sections with a student strength of
m. Read module1 aggregate marks of all students and display best and worst
performing students with the help of functions.
10. a) Sai needs to check n numbers and tell whether they are positive/negative and even/odd.
Develop C code by using functions to help Sai.
b) Write a C Program to accept 'n' names from user, store them into 2-D array and search
whether a given name is present in array or not.