0% found this document useful (0 votes)
63 views2 pages

Module Bank 2 PC

The document contains 10 multiple choice questions about C programming concepts like arrays, strings, matrices, and functions. The questions cover topics like sorting arrays, prime numbers, palindromes, concatenation, and more. Functions are used to help solve some of the problems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views2 pages

Module Bank 2 PC

The document contains 10 multiple choice questions about C programming concepts like arrays, strings, matrices, and functions. The questions cover topics like sorting arrays, prime numbers, palindromes, concatenation, and more. Functions are used to help solve some of the problems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

______________________________________________________________

Module Question Bank -2

Staff Name: Dr. C.Sateesh Kumar Reddy


Department: Advanced Computer Science and Engineering
Designation: Assistant Professor (Senior Level)
Subject: Programming in C
Subject Code:22TP103
Class: DS, AI&ML+DS Sec: 39 & 40

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.

4. Write a program to perform the following operations on a given matrix of size


m X n.
(a) Sum of ith row and jth row elements.
(b) Sum of second column and third column elements.
(c) Sum of the diagonal elements of a matrix
(d) Inverse of a matrix.
(e)Transpose of matrix.
(f) Determinant of matrix.
5. Write a Program to read two strings S1 and S2 and perform the following:
a) Concatenate the two strings as Highest length string followed by other.
b) Print the number of common characters in both the strings.
c) Print the distinct characters from both the strings as a new string.
d) check whether S1 and S2 are palindromes or not.

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

8. Write a menu-driven program in C to perform the following operations on string using


standard library functions.
a) Calculate Length of String
b) Reverse a given String
c) Concatenation of one string to another
d) Copy one String into another
e) Compare two Strings

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.

You might also like