CS6202 - PROGRAMMING & ATA STRUCTURES I Question Bank UNIT I Part - A 1. What are Keywords? 2. What is the difference between if and while statement? 3. What is the difference between while loop and do while loop? 4. What will happen when you access the array more than its dimension? 5. Write the limitations of getchar( ) and sacnf( ) functions for reading strings. 6. What is the output of the programs given below? 7. Distinguish between Call by value Call by reference. 8. What is the difference between while(a) and while(!a)? 9. Why we don t use the symbol & symbol, while reading a String through scanf()? 10. What is the difference between static and auto storage classes? 11. Define delimiters in C. 12. Differentiate break and continue statement. 13. Distinguish between while..do and do..while statement in C. 14. Compare switch( ) and nestedif statement. 15. Give the syntax for the for loop statement 16. What is the use of sizeof( ) operator? 17. What is a loop control statement? 18. What are global variable in C? 19. Write a program to swap the values of two variables (without temporary variable). 20. What is an array? 21. What is a Pointer? How a variable is declared to the pointer? 22. What are the uses of Pointers? 23. What is the output of the program? 24. How can you return more than one value from a function? 25.What are the main elements of an array declaration? 26.List the header files in C language. 27.What are the pre-processor directives? 28. What is the difference between an array and pointer? 29.Is it better to use a macro or a function? 30.List the characteristics of Arrays. 31.What are the types of Arrays? 32.What is the use of \0 character? 33. What is C functions? Why they are used? 34. Differentiate library functions and User-defined functions.
35. What are the steps in writing a function in a program? 36. Give the syntax for using user-defined functions in a program. 37. Classify the functions based on arguments and return values. 38. Define pre-processor in C. 39. Define Macro in C. 40. What are conditional Inclusions in Preprocessor Directive? 41. What you meant by Source file Inclusion in Preprocessor directive? PART B 1. Explain about the various decision making statements in C language. 2. Explain the control statements in c. 3. What are functions? Explain the types of functions in detail with an example program for each type. 4. Define arrays. Explain the array types with an example program for each type 5. What are pointers? When and why they are used? Explain in detail with sample programs. 6. Describe in detail about the Preprocessors in C. 7. Explain function pointers with example. 8. Detailly explain about function with variable number of arguments.?
1. Define structure. CS6202 - PROGRAMMING & DATA STRUCTURES I 2. What is meant by structure template? UNIT II Part A 3. Write the syntax for structure declaration and definition 4. Define union. 5. Write the syntax for union declaration and definition. 6. How structures are initialized? Give example. 6. What are nested structures? 8. What is meant by array of structures? 9. What is structure assignment? 10. How do you reference a structure member? 11. Differentiate structure and union. 12. Differentiate Struct and array. 13. What are the advantages of union over structure? 13. Write the syntax for pointers to structure. 15. What is a file? 16. Write the syntax for file declaration. 17. What are file modes? 18. Write the syntax to open a file. 19. What is the significance of fclose() function? 20. What are the steps for using a file? 21. What are the functions of text files in stdio library? 22. What are the file pointers of stdlib.h? 23. What are the types of files? 24. What are the features of binary files? 24. What are the functions to access files randomly? Part B 1. Explain the different modes in which a file can be opened. 2. Explain the functions fscanf, fprintf, fgets, fputs, getw, putw, getc, putc, fread, fwrite, feof, ferror,fseek,ftell,rewind with example. 3. Explain structures with an example 4. Explain union with an example 5. Discuss about the file handling concepts in C 6. Explain different ways to read data from a file. 7. Explain different ways to write data to a file
8. Design a c program to create the employee database and to perform the manipulations such as adding a record, deleting a record, updating a record. 9. Explain about structure within structure with example.
CS6202 - PROGRAMMING & DATA STRUCTURES - I 1. What is a data structure? 2. Why do we need data structures? 2. List some common data structures. 3. How data structures are classified? Unit III Part A 4. Differentiate linear and non-linear data structure. 5. Define ADT(Abstract Data Type) 6. Mention the features of ADT. 7. Define List ADT 8. What are the ways of implementing linked list? 9. What are the types of linked lists? 11. How the singly linked lists can be represented? 12. How the doubly linked list can be represented? 13. What are benefits of ADT? 14. When singly linked list can be represented as circular linked list? 15. When doubly linked list can be represented as circular linked list? 16. Where cursor implementation can be used? 16. List down the applications of List. 18. What are the advantages of linked list? 19. Mention the demerits of linked list 20. How the polynomial is represented using linked lists? 21. What are the operations performed in list? 22. What are the merits and demerits of array implementation of lists? 22. What is a circular linked list? Part B 1. Explain the various operations of the list ADT with examples 2. Write the program for array implementation of lists 3. Write a C program for linked list implementation of list. 4. Explain the operations of singly linked lists 5. Explain the operations of doubly linked lists 6. Explain the operations of circularly linked lists 7. How polynomial manipulations are performed with lists? Explain the operations 8. Explain the steps involved in insertion and deletion into an singly and doubly linked list. Page 5
1. Define Stack. CS6202 - PROGRAMMING & DATA STRUCTURES I 2. What are the operations of the stack? Unit IV Part - A 3. Write the routine to push a element into a stack. 4. How the operations performed on linked list implementation of stack? 5. What are the applications of stack? 6. What are the methods to implement stack in C? 7. How the stack is implemented by linked list? 8. Write the routine to pop a element from a stack. 9. Define queue. 10. What are the operations of a queue? 11. Write the routine to insert a element onto a queue. 12. What are the types of queue? 13. Define double ended queue 14. What are the methods to implement queue in C? 15. How the queue is implemented by linked list? 16. Write the routine to delete a element from a queue 17. What are the applications of queue? 18. Define circular queue 19. What are push and pop operations? 20. What are enqueue and dequeue operations? Part B 1. Explain Stack ADT and its operations 2. Explain array based implementation of stacks 3. Explain linked list implementation of stacks 4. Explain the applications of Stacks 5. Explain how to evaluate arithmetic expressions using stacks 6. Explain queue ADT 7. Explain array based implementation of queues 8. Explain linked list implementation of queues 9. Explain the applications of queues 10. Explain circular queue and its implementation 11. Explain double ended queue and its operations
CS6202 - PROGRAMMING & DATA STRUCTURES I 1. Define sorting 2. Mention the types of sorting Unit V Part A 2. What do you mean by internal and external sorting? 3. Define bubble sort 4. How the insertion sort is done with the array? 5. What are the steps for selection sort? 6. What is meant by shell sort? 7. What are the steps in quick sort? 9. Define radix sort 10. What are the advantages of insertion sort 10. Define searching 11. Mention the types of searching 12. What is meant by linear search? 13. What is binary search? 14. Define hashing function 15. What is open addressing? 16. What are the collision resolution methods? 17. Define separate chaining Part B 1. Explain the sorting algorithms 2. Explain the searching algorithms 3. Explain hashing 4. Explain open addressing 5. Write a C program to sort the elements using bubble sort. 6. Write a C program to perform searching operations using linear and binary search. 7. Explain in detail about separate chaining.