DS Question Bank

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

MODULE 1

1. Explain a general structure of C program with an example.


2. What is a token? What are different types of tokens available in C language? Explain.
3. Explain if, if-else, nested if-else and cascaded if-else with examples and syntax.
4. Explain the different types of loops in C with syntax.
5. Develop a C program to check whether the given number palindrome or not.
6. List the basic datatypes available in c.
7. List and explain the unconditional branching statement the example programs.
8. Show how break and continue statements are used in a C-program, with example.
9. Explain the working of break, continue statement in C with example.
10. Explain switch statement with syntax and example.
11. Develop a simple calculator program in C language to do simple operations like
addition, subtraction, multiplication and division. Use switch statement in your
program
12. Explain with examples formatted input output statements in C
13. Explain with syntax, if and if-else statements in C program.
14. Explain with syntax, else if ladder and nested if-else statements in C program.
15. Explain with syntax, switch and if-else statements in C program.
16. Develop a C program to find the largest of three numbers.
17. Develop a C program to find the factorial of a given number using loop.
18. Develop a C program to find the sum of first n natural numbers using loop.
19. Difference between while and do while.
20. Develop a C program to find the largest of three numbers.
21. What is variable? What are the rules to construct variable?
22. Write a note on the operators

MODULE 2
1. What is an array? How a single dimension and one-dimension arrays
are declared and initialized?
2. Develop a C program to concatenate 2 strings without using built-in function.
3. Develop a C program to check whether the given string palindrome or not.
4. Develop a C program to compare 2 strings without using built-in function.
5. Develop a C program to find the length of the string without using built-in function.
6. Define String. Explain any 5-string manipulation function with suitable example.
7. Explain the difference between gets () and scanf () functions.
8. Write an algorithm and develop a C program that reads N integer
numbers and arrange them in ascending order using bubble Sort.
9. Develop a C program that reads N integer numbers and find the largest number in an
array.
10. Develop a C program that reads N integer numbers and find the smallest number in an
array.
11. Explain string manipulation library functions with their syntaxes. Write
a program to check whether a string is palindrome or not.
12. develop a C program to search an integer from N numbers in ascending order using binary
searching technique.
13. develop a C program to search an integer from N numbers in ascending order using linear
searching technique.
14. Write a program in C to find the sum and mean of all elements in an array.
15. Define function? Explain different components of functions with example program.
16. What is function? Explain different classification of user defined functions based on
parameter passing and return type with examples.

MODULE 3

1. Write a program in C using functions to swap two numbers call by value


and call by reference concept.
2. Write a c-program using function to check whether the given number is
prime or not.
3. What is structure? Explain C syntax of structure declaration with example.
4. Explain structure within a structure with an example.
5. Write a c-program using structures to read, write, compute average -
6. marks and display the students scoring above and below the average marks for a class of
N students.
7. What is a pointer? Explain how the pointer variable declared and initialized.
8. Write a program in C to find the sum and mean of all elements in an array using pointers.
9. Define Pointer. Explain pointer variable declaration and initialization with
suitable example.
10. Explain the difference between a null pointer and a void pointer.
11. Discuss the general syntax of structure variable declaration of structure to store book
information.
12. Differentiate between structure and union.
13. Implement structures to read, write and compute average- marks of the students,
list the students scoring above and below the average marks for a class of N students.

MODULE 4

1. Write a c-program using recursion to generate the Fibonacci series.


2. Write a c-program using recursion to search an element in an array using binary search
algorithm.
3. Write a c-program using recursion to calculate the Factorial of a given number.
4. Define stack, representation of stack and why it is called LIFO?
List out and explain the different operations performed on stack.
5. Write an algorithm for PUSH and POP operations.
6. Write an algorithm for PEEK and Display operations.
7. Implement the operations of stack using arrays.
MODULE 5

1. Define queue. List out characteristics and representation of queue.


2. Define queue, representation of queue and why it is called FIFO?
List out and explain the different operations performed on queue.
3. Write an algorithm for ENQUEUE and DEQUEUE operations.
4. Write an algorithm for Front, Rear and Display operations.
5. Implement the operations of queue using arrays.

You might also like