0% found this document useful (0 votes)
34 views1 page

DS QB-1

Ds QB

Uploaded by

sajood
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)
34 views1 page

DS QB-1

Ds QB

Uploaded by

sajood
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/ 1

DATA STRUCTURES and APPLICATIONS

Question Bank -1
1. Define- Data Structure. Explain the classification of data Structure in detail
2. How the memory can be allocated at run time? Explain with an example.
3. Briefly explain: i) malloc( ) ii) calloc( ) iii) realloc( ) iv) free()
4. What is pointer? Explain pointer using pass by address.
5. Define: Recursion. Explain recursion for Towers of Hanoi problem.
6. The Fibonacci numbers are defined as f0=0,f1=1 and fi=fi-1+fi-2 for i>1 Write a recursive function to
compute fi.
7. Explain recursion in detail with the help of a program.

8. What is an Algorithm? Explain the various constraints it has to satisfy.


9. Write a recursive function for binary search and Explain.
10. Explain how recursive function can be used to find the GCD/HCF of 2 numbers.
11. Differentiate malloc(), calloc() and realloc() in detail.
12. What is dangling pointer? Explain the use of free() with the help of a program.
13. Write a C program to find the average of ‘n’ numbers using pointers.
14. Write a C program to swap two floating point numbers using function and pointers.
15. Explain the various ways in Structure can be declared and defined in C.
16. Compare and contrast structures with unions. Write short notes on self-referential structure.
17. What is Structure? Explain the different ways in which they are created.
18. Write a C program which stores the Employee information such as name, id, basic salary, DA , CCA and
HRA. Find the total salary of an employee by considering DA=125% of Basic salary, HRA=30% of Basic salary,
CC=5% of Basic salary and Gross salary is sum of Basic salary, DA, HRA and CCA.
19. Write a C program which stores the Student information such as name, rollno, marks in 3 subjects. Find the
average marks obtained by a student by displaying his details.
20. Write a C program to do the following operation on two complex numbers.
1. Addition 2. Subtraction 3. Multiplication 4. Division
21. Write a C program to implement Stack and Queue for n Integer values.
22. Write a C Program to push an element and pop an element from the stack.
23. Explain the various operations performed on Queue.
24. What is sparse Matrix? How transpose of a Sparse Matrix performed explain with an example.
25. Write a C Program to find the transpose of a Sparse Matrix.
26. Design, Develop and Implement a menu driven Program in C for the following Array operations
a. Creating an Array of N Integer Elements b. Display of Array Elements with Suitable Headings
c. Inserting an Element (ELEM) at a given valid Position (POS)
d. Deleting an Element at a given valid Position(POS) e. Exit.
Support the program with functions for each of the above operations.
27. Design, Develop and Implement a Program in C for the following operations on Strings
a. Read a main String (STR), a Pattern String (PAT) and a Replace String(REP)
b. Perform Pattern Matching Operation: Find and Replace all occurrences of PAT in STR with REP if PAT exists
in STR. Report suitable messages in case PAT does not exist in STR Support the program with functions
for each of the above operations. Don't use Built-in functions
Dept. Of Information Science & Engg, HKBK College of Engg.

You might also like