CS6301-Programming and Data structure - Vidyarthiplus

1 downloads 129 Views 676KB Size Report
Define DFs. 7. Compare BFS and DFS . 8. Define Topological Sort. 9. Define Indegree and out degree. 10. What is Minimum
www.Vidyarthiplus.com

VIDYARTHIPLUS - ANNA UNIVERSITY ONLINE STUDENTS COMMUNITY DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK

CS6301-Programming and Data structure –II II Year –III Semester UNIT-I

OBJECT ORIENTED PROGRAMMING FUNDAMENTALS PART-A

1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20.

Define object oriented programming Define Object. Define Class. Define Encapsulation. Define Data Hiding. Define Data Abstraction. Define Data Members. Define Constructor. List the Types of Constructor. Define Static Member. List the storage class in C++. List out the operators used in pointer concepts. Define Pointer Variable. What is the use of Scope resolution operator. What is call by reference and address State the Advantages of Default Argument. Define Constant members. Define Copy Constructor. Difference between Copy Constructor and Assignment Constructor. Define this pointer. PART-B

1. 2. 3. 4. 5. 6.

Explain the basic features of Object oriented programming in C++.(16) Difference between Struct and Class in also illustrate with Example.(8) Explain briefly about Constructor and it types with suitable Example.(16) Explain about Storage Classes in C++ with Examples(16). Explain about static members with suitable example.(8). Explain the following (8) i) Pointer object.

www.Vidyarthiplus.com

www.Vidyarthiplus.com

7. 8. 9. 10.

ii) this pointer. Explain about call by reference and return by reference with C++ Programs(16) Write a C++ program to get and display employee details using class and object.(16) Write a C++ program to get and display student details using static members.(16) Write a C++ program to use destructor and constructor in C++.(10)

UNIT-II

OBJECT ORIENTED PROGRAMMING CONCEPTS PART-A 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 1. 2. 3. 4.

5. 6. 7. 8.

What is String iterator? Define String Constructor. List the String Errors. Define Copy Constructor. Define Polymorphism List the types of polymorphism. What is function overloading? Define operator overloading. List the operator cannot overload in C++. List the Advantage and disadvantage of operator overloading. How we achieve dynamic memory allocation in C++? What is nested Class? Define inheritance. List the types of inheritance. Difference between multi level and multiple inheritance. Define Virtual Function. Define pure Virtual function. What is Virtual table.? What is Virtual Destructor? How to implement default argument with Virtual function. PART-B Explain briefly about Copy Constructor with example program in C++. Explain briefly about Inheritance with example program in C++. Explain about the function overloading with suitable example program in C++. Explain the syntax of operator overloading.How many arguments are needed in the definition of an overloaded binary operator with and without friend function and give example Explain about the operator overloading through friend function with example program. Write a C++ program to add two complex number using operators overloading. Explain about nested class with suitable example. Explain briefly about virtual function with suitable example program.

www.Vidyarthiplus.com

www.Vidyarthiplus.com

9. Write a C++ program the takes two values of Time(hr,min,sec) and the sum using constructor and operator overloading 10. Consider a fruit basket class with no of apples, no of mangos as data member. Overload the + operator to add two object of the class

UNIT-III C++ Programming Advanced Features PART-A 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20.

Define Abstract class. Define Exception Handling. Define STL List the types of STL components. What is Container and its types. What are the advantages of using container. Difference between sequence and sorted associative container. What is iterator. What is the use of allocator. What is meant by adaptors container? give Example. Define template. List the types of Template. What are the advantages of Template. What is parameterized class. List the various file modes in the C++ What is file pointer.? Give a syntax reading a binary file. Give a syntax for writing a binary file. List the types to open the binary file. List the types to close the binary file.

PART-B 1. 2. 3. 4. 5. 6. 7. 8.

Explain the Exceptional handling with suitable diagram and example. Explain briefly about template concepts. Explain briefly about File Handling in C++.. Write a C++ program to implement linked list concept using template. Explain about Iterator with suitable example. Explain about function adapters with suitable example. Explain about allocator with suitable example. Write a C++ program to sort the data using template.

www.Vidyarthiplus.com

www.Vidyarthiplus.com

9. Define a template class stack and implement all possible functionality of a stack. 10. Write a program to implement a Random Access File.

UNIT-IV NON LINEAR DATA STRUCTURE PART-A 1. Define non linear datastructure. 2. Define AVL tree. 3. List the rotations in AVL Tree. 4. How to calculate the balancing facor in AVL Tree 5. Define red-Black tree. 6. What is the searching time for Red –Black tree. 7. List the properties of Red-Black Tree. 8. What are the properties of B-Tree. 9. What are the rules for B-Tree. 10. What is Splay Tree. 11. List the Rotation in Splay Tree. 12. Define Binomial Heap. 13. What are the operations performed in Binomial Heap. 14. What is Amortized Analysis. 15. Define Aggregate Analysis. 16. Define FibacciHeap. 17. List the Operations in FibonacciHeap. 18. What is Deletmin in FibonacciHeap. 19. What is Accounting method. 20. What is potential method. PART-B 1. Explain AVL Tree with Suitable example. 2. Explain B-Tree with Suitable example. 3. Explain Red-BlackTree with Suitable example. 4. Explain Splay Tree with Suitable Example. 5. Explain BinamialGHeap with Suitable example. 6. Explain fibonacciHeap with Suitable example 7. Explain briefly about disjoint set. 8. Build an AVL tree with the following values:

www.Vidyarthiplus.com

www.Vidyarthiplus.com

15, 20, 24, 10, 13, 7, 30, 36, 25 and Delete 13 and 25. 9. Build an Splay tree with the following values: 9 2 90 53 4 64 95 59 10. Build an Red-Black tree with the following values: 15, 20, 24, 10, 13, 7, 30, 36, 25

UNIT-V GRAPHS PART-A 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20.

Define Graph. Compare Tree and Graph. List the representation of Graph. What is Graph traversal. Define BFS. Define DFs. Compare BFS and DFS . Define Topological Sort. Define Indegree and out degree. What is Minimum Spanning Tree. What is Kruskal? What is Prim? Compare Kruskal and Prim. Define Shortest path. Write Dijktras Algorithm. Write Bellman ford algorithm. Write Floyd-warshall Algorithm. Compare Bellman and Floyd . Define Single source shortest path algorithm . Define all pair shortest path algorithm.

PART-B 1. 2. 3. 4. 5. 6. 7. 8.

Explain about BFS with suitable example. Explain about DFS with suitable example. Explain about Topological Sort with suitable example. Explain about Kruskal algorithm with suitable example. Explain about Prims with suitable example. Explain about Dijktra’s algorithm with suitable example. Explain about Bellman-Ford algorithm with suitable example. Explain about Floyd-warshall with suitable example.

www.Vidyarthiplus.com

www.Vidyarthiplus.com

www.Vidyarthiplus.com