DS QB
DS QB
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 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
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
5/8 Marks
1. Explain the advantages of linked list.
5. Write a code snippet to search and display the node in the linked list.