0% found this document useful (0 votes)
25 views7 pages

DS QB

The document is a comprehensive question bank covering topics in C programming, data structures, stacks, queues, and linked lists. It includes both 2-mark and 5/8-mark questions that address definitions, programming examples, and explanations of various concepts. The content is structured to facilitate learning and assessment in computer science and programming fundamentals.

Uploaded by

shreyassupe346
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)
25 views7 pages

DS QB

The document is a comprehensive question bank covering topics in C programming, data structures, stacks, queues, and linked lists. It includes both 2-mark and 5/8-mark questions that address definitions, programming examples, and explanations of various concepts. The content is structured to facilitate learning and assessment in computer science and programming fundamentals.

Uploaded by

shreyassupe346
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/ 7

DS Question Bank

1. INTRODUCTION TO C AND FUNCTIONS


2 Marks
1. List the Features of C Programming.
2. Define C Tokens and mention it’s the types of it.
3. Define keywords with an example.
4. Define identifiers with an example.
5. Define Constants in C with an example.
6. Write a C program to demonstrate constants in C.
7. Define Datatypes with an example.
8. Write a C program to demonstrate Symbolic Constants.
9. Define type conversion with its types.
10. Write a C program to demonstrate implicit type conversion.
11. Write a C program to demonstrate Explicit type conversion.
12. Mention the types of conditional branching statements.
13. Mention the types of unconditional branching statements.
14. What are functions? Give the types of functions.
15. Mention the types of user defined functions.
16. Write the elements of user defined functions.
17. Write the syntax to define a function?
18. What are actual and formal parameters.
19. Mention the differences between call by value and call by reference.
20. Define Recursion.

5/8 Marks
1. Explain the structure of C Program with a neat diagram.
2. Briefly explain the rules to form the identifiers in C.
3. Define variables and write the general rules to form variables
4. Write a C program to demonstrate the following:
• Arithmetic Operators
• Relational Operators
• Logical Operators
• Assignment Operators
• Bitwise Operators
• Conditional Operator
5. Explain Simple if and if…else statements with examples.
6. Explain Nested if and else… if ladder statements in C.
7. Briefly explain switch statement with an example.
8. Write the differences between while and do-while loop.
9. Explain the following looping statements with its syntax and
programming example.
• For loop
• While loop
• Do while loop
10. Write a C program to demonstrate nested for loop.
11. Illustrate about break and continue statements with examples.
12. Write a C program for the following
• Function without parameters without return value.
• Function with parameters with return value.
• Function with parameters without return value.
• Function without parameters with return value.
13. Explain Pass by value and pass by reference.
14. Write a C program to demonstrate call by value and call by reference.
15. Write a C program to find the factorial of a number using recursion.
16. Write a C program to generate Fibonacci series using recursion.
17. Write a C program on tower of Hanoi using recursion.

2. DATA STRUCTURES AND SEARCHING TECHNIQUES

2 Marks
1. Define Data Structures.
2. Give the types of data structures.
3. Define linear and non-linear data structure.
4. Mention the operations performed on data structures.
5. Write the differences between primitive and non-primitive data
structure.
6. Define Arrays with its types.
7. Define structure with its syntax.
8. Write the difference between structure and union.
9. What are pointers?
10. How to access the address of a variable using pointers.
11. How to declare and initialize the pointer variable.
12. Write a C code to access a variable through its pointer.
13. Define static and dynamic memory allocation.
14. Mention the disadvantages of static memory allocation.
15. List the memory management functions.
16. Describe the following functions with its syntax.
• Malloc()
• Calloc()
• Realloc()
• Free()

5/8 Marks
1. Explain the operations of data structure.
2. Write the differences between linear and non-linear data structure.
3. Write a C program to demonstrate one dimensional Array.
4. Write a C program to add two matrices using two-dimensional Array.
5. Write a note on Arrays.
6. Write a note on Structures.
7. Write a C program to demonstrate Structures.
8. Write a C program to demonstrate pointers.
9. Write the differences between static and dynamic memory allocation.
10. Mention the differences between malloc and calloc.
11. Write a C program to demonstrate malloc().
12. Write a C program to demonstrate calloc().
13. Write a C program to demonstrate realloc()
14. Explain briefly about memory management functions.
15. Write a note on maollc() and calloc() with suitable examples.
16. Write C Program for the following searching and sorting techniques.
• Linear Search
• Binary Search
• Bubble Sort
• Selection Sort

3. STACK AND QUEUE

2 Marks
1. Define stack with its diagrammatic representation.
2. Mention the operations of stack.
3. Write the applications of stack.
4. Define queue with its representation.
5. Mention the types of queues.
6. List the operations on all types of queues.
7. Define circular queue with its representation.
8. Define double ended queue with its operations.
9. Define priority queue.

5/8 Marks
Write a C program to demonstrate Stack.
Convert the following infix expressions to postfix expression using repeated
substitution method.
------------
Convert the following infix expressions to prefix expression using repeated
substitution method.
-----------
Convert the following infix expressions to postfix expression using repeated
stack method.
------------
Evaluate the given expression using stack.
------------
Write a C program to demonstrate simple/linear Queue.

4. LINKED LIST

2 Marks

1. Define linked list.


2. Write the components of linked list.
3. Give the representation of linked list.
4. Mention the types of linked list.

5. Write the operations of singly linked list.


6. Define the following with its representation.
• Singly linked list
• Doubly linked list
• Circular linked list
• Doubly circular linked list

5/8 Marks
1. Explain the advantages of linked list.

2. Explain the disadvantages of linked list.

3. Write a C program on linked list to perform the following.

• Insertion, deletion, display

• Insertion, Searching, display

4. Write a function to insert on delete a node from the linked list.

5. Write a code snippet to search and display the node in the linked list.

You might also like