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

CPDS UNIT 2 QuestionBank

This document contains question banks for the UNIT-II exam in the course 20CSE102 – C Programming and Data Structures. It includes 10 single mark questions testing basic concepts like arrays, functions, storage classes, binary search, and recursion. It also includes 10 multiple mark questions asking students to write code for algorithms like Fibonacci series, prime number series, bubble sort, binary search, linear search, matrix multiplication, and various sorting algorithms using functions, arrays and recursion. Students are expected to write well commented C code for these problems.

Uploaded by

saipraneetha495
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)
114 views2 pages

CPDS UNIT 2 QuestionBank

This document contains question banks for the UNIT-II exam in the course 20CSE102 – C Programming and Data Structures. It includes 10 single mark questions testing basic concepts like arrays, functions, storage classes, binary search, and recursion. It also includes 10 multiple mark questions asking students to write code for algorithms like Fibonacci series, prime number series, bubble sort, binary search, linear search, matrix multiplication, and various sorting algorithms using functions, arrays and recursion. Students are expected to write well commented C code for these problems.

Uploaded by

saipraneetha495
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

MADANAPALLE INSTITUTE OF TECHNOLOGY & SCIENCE

Department of Computer Science & Engineering


20CSE102 – C Programming and Data Structures
QUESTION BANK

UNIT – II

1 MARK QUESTIONS:

1. What is an Array? Write the syntax for one-dimensional array.


2. Compare between formal arguments and actual arguments.
3. Write a C program to find the power of a number using In-built function.
4. State the difference between user defined and pre defined functions.
5. Which is the only function that all C program must contain?
6. Define return statement.
7. Define Function.
8. What is the difference between the number ‘4’ in the following statements?
(a) int num[4];
(b) num[4]= 5;
9. What is the starting index of an array?
10. State the types of storage classes.
11. What is the precondition for Binary Search
12. What would be the output of the following program:
int main( )
{
printf ( "\nOnly Engineers use C?" ) ;
display( ) ;
return 0;
}
void display( )
{
printf ( "\nScientists too use C!" ) ;
main( ) ;
}

10 MARK QUESTIONS:

1. a. Develop the code in C for printing Fibonacci Series up to an index n using Recursive
Function.
b. Develop the code to print Prime Number Series up to n.
2. Given an array a[ ]={6,3,1,9,25,55,35,22,11,40}, apply the bubble sort to sort the given
array.
3. What are various types of User defined Functions in C? Explain each type with suitable
example program.
4. Explain different storage classes available in C. Provide a suitable example for the use of
each class.
5. What is binary search? Develop the code for Binary Search to find the particular key in an
array.
6. Develop the code for Linear Search to find the particular key in a given array.
7. Develop the code for Matrix Multiplication.
8. Develop the code for Insertion Sort.
9. Develop the code for Selection Sort.
10. (i) Write a C program to find factorial of n using recursion.
(ii) Develop the code for printing array elements using a function.

You might also like