c mod3 qb
c mod3 qb
Strings
Q.No Question
1. Define Arrays. Explain the declaration and different methods of Initialization of 1-D arrays.
2. Define an array? Explain the various declaration and initialization methods of two dimensional
arrays with examples
3. Explain the concept of reading and printing of 1-D arrays with an example program.
Write a C program to read n array elements in a random order. Perform bubble sort operation on
4.
it to sort the elements in an ascending order and display the sorted array.
5. Write a C program to read n elements of a 1D array and perform binary search operation to
search a key element specified by the user.
Write a C program to read n array elements of a 1D array, compute sum of odd and even
6.
numbers of the elements present in the same array.
Write a C program to find largest and smallest element in an 1D array of size n.
7.
Differentiate between linear search and Binary search.
8.
Write a C program to read n elements of a 1D array and perform linear search operation to
9.
search a key element specified by the user.
10. Write a C program that accepts 2 matrices A (m* n) & B (p*q) and perform product of two
matrices. Display the resultant matrix in proper format.
Write a C program to compute transpose of 2D array elements and display the resultant matrix in
11.
matrix format only.
What is a function? What are the different types of functions?
12.
Explain in brief the need for user defined functions detailing the different elements of
13.
user defined functions
Explain the four different categories of a Function with an example program for each.
14.
Write a program to read an array and find its sum and average using function by passing array
15
as the parameter
Differentiate actual parameters and formal parameters.
16
Distinguish between call by value and call by reference with the help of programs
17
Explain the concept of recursion with syntax and an example program. Detail the recursion call
18
with the clear tracing steps.
Write a C program to generate Fibonacci series using recursion.
19
Write a C program to compute factorial of a number using recursion.
20
Write a C Program to demonstrate function call without parameters and no return value.
21
Write a C program to swap 2 numbers using functions
22
Compare between the following
23
• function declaration and function definition
• call by value and call by reference
• actual parameters and formal parameters
Write the general template of a User Defined Function (UDF). Using a sample program.
24
Explain how the UDF works for call by address concept in the case of swapping two integer
numbers.
25 Explain various built-in string functions with syntax and example program.
Define String? Explain the various declaration and initialization methods of one dimensional
26.
string with example program.
Write a program to find length of string without using inbuilt function.
27.
Write a C program to implement the following operations without using library functions.
Display the results after every operation.
28. a. Read STRING S1 = “Dayananda”
b. Read STRING S2 = “Sagar”
c. Output the concatenated string (s1+s2) STIRNG s3 = “Dayananda Sagar”
Write a program in C to reverse a string without using inbuilt function.
29.
Dept.of CSE
6