anu B.sc second year old c++ papers

ACHARYA NAGARJUNA UNIVERSITY
B.SC. SECOND YEAR DEGREE EXAMINATION
JULY---2008

1. a) what is object oriented programming? Explain how data and functions in an object oriented programming.
b) Explain:
a)member dereferencing operators.
b) Memory management operators.
2. a) write a program to print a table of values of the function y for Ax varying from 0 to 10 in steps of 0.1.
b) a) how do you create a new abstract data type?
b) Explain unformatted I/O operations.
3. a) what is an array of objects?lllustrate the of object arrays.
b) Explain:
i) Pointers to members
ii) Dynamic arrays
4. a)how do you make a private member inheritable? Explain multiple inheritance with a sutable example.
b) Explain the concept of linked and show how it is used.
5. a) explain the linked implementation of stacks.
b) explain insert, delete operations for lists and write the routines.
PART---B (4*5=20 marks)
(Answer any four questions.)SSS
6. Explain a method for specifying an ADT.
7. Explain width () and precision () functions with suitable examples.
8. Define operator overloading. Write a program to overload the unary minus operator.
9. What is recursion? Explain.
10. What are the advantages of representing a queue by a linked list?
11. Write routines for the primitive operations where a graph is described by its adjacency matrix.

PART---C (10*2=20 marks)
(Answer all questions)
12. What is data encapsulation?
13. What is dynamic initialization?
14. Write the general form of a member function definition.
15. How an overloaded operator function is invoked?
16. Define a derived class.
17. What is the use of object pointers?
18. What does polymorphism mean?
19. Explain cin and cout.
20. What is a null pointer?
21. Define a graph. Give two applications of graph.

--------------------------------MARCH----2008 PAPER -------------------------------------------
ACHARYA NAGARJUNA UNIVERSITY
B.SC. SECOND YEAR DEGREE EXAMINATION
MARCH---2008
PAPER—II: COMPUTER SCIENCE
PART—11: PROGRMING IN C++ AND DATA STRUCTURES
Time: 3 hours maximum: 100 marks
PART-A (3*20=60 marks)
(Answer any three questions)
1. A) explain: I)reference variables
ii) Operators in c++.
b) Explain: I) call by reference
ii) Return by reference and
iii) in line functions
2. A) What is a friend function? What are the merits and demerits of using friend function?
B) Explain the I/O system in c++.
3. A) explain ‘array of objects’. Illustrate the use of object arrays.
B) Explain: I) passing pointers to a function
Ii) Array of pointers with suitable examples

4. a) explain class templates and function templates with suitable examples.
b) Explain different forms of inherence with suitable examples.
5. a) explain the tree methods traversal methods with their routines.
b) Write algorithms for depth first search and breathe first search methods.
PART---B (4*5=20 marks)
(Answer any four questions.)
6. What is objected oriented programming? What are its advantages?
7. What are the different ways of defining member functions? Explain with suitable program examples.
8. Explain dynamic initialization of objects.
9. Explain how dynamic variables can be used to important linked lists.
10. Write a routine for insert operation in the case where a graph is described by its adjacency matrix.
PART---C (10*2=20 marks)
(Answer all questions)
12. What is meant by dynamic binding?
13. What are memory management operations?
14. What do you mean by overloading of a function?
15. What are objects? How are they created?
16. What is recursion?
17. What is meant by compile time polymorphism?
18. What are abstract base classes?
19. What is the role of file() function?
20. How do you represent stack as an ADT?
21. What is an adjacency list?

-----------------------------------JULY---2007 PAPER----------------------------------
ACHARYA NAGARJUNA UNIVERSITY
B.SC. SECOND YEAR DEGREE EXAMINATION
JULY---2007
PART—II: COMPUTER SCIENCE
PART—11: PROGRMING IN C++ AND DATA STRUCTURES
Time: 3 hours maximum: 100 marks
PART-A (3*20=60 marks)
(Answer any three questions)

1. a) What is the difference between recursion and iteration? Explain with example.
b) Implement queue using
i) arrays ii)linked list
2. a) write difference between single linked list and a double linked list.
b) write an algorithm for prim’s minimal spanning tree.
3. a) what are the command-line arguments? Explain their use with the help of an example.
b) explain templates and exception handling in c++ with examples.
4. a) describe array of classes and pointer to objects.
b) explain polymorphism and dynamic binding .
5. a) write short notes on public, protected and private.
b) what is meant by operator overloading? Write a program to overload comparison operator.
PART---B (4*5=20 marks)
(Answer any four questions.)
6. write a program to perform multiplication of two matrices.
7. how do the while loop varies do while loop? Discuss the break, continue statements.
8. what is a circular linked list? What are its advantages and disadvantages?
9. what are the applications of binary tree?
10. write an algorithm for depth first search.
11. discuss about friend function with an examples.


PART---C (10*2=20 marks)
(Answer all questions)
12. what is late binding?
13. what is polymorphism?
14. what is a graph?
15. define time complexity.
16. what is an abstract vbase class?
17. what is type casting?
18. write about scope resolution operator.
19. what is a macro?
2.. what is a virtual base class?
21. write about union.

-------------------------------------MARCH---2007 PAPER----------------------------------
ACHARYA NAGARJUNA UNIVERSITY
B.SC. SECOND YEAR DEGREE EXAMINATION
MARCH---2007
PART—II: COMPUTER SCIENCE
PART—11: PROGRMING IN C++ AND DATA STRUCTURES
Time: 3 hours maximum: 100 marks
PART-A (3*20=60 marks)
(Answer any three questions)
1. what are the principles of object oriented programming languages? Discuss the advantages over structured programming languages.
2. a) What is an array in c++? Explain with examples.
b) Explain the visibility modes for different members of base class in derived classes with help of examples.
3. a) what is a list and write a program for insertion and deletion of a element in single linked list?
b) Design an algorithm to implement a deque using an array.
4. a) write a recursive algorithm to generate a fibonacci sequence upto the nth term,where n is any integer.
b) write a recursive function to print post-order traversal of a binary tree.
5. a) write an algorithm to implement the bubble sort and the following list in ascending order using bubble sort:13,24,5,19,2,17,4.
b) what is the average run-time complexity of bubble sort?
PART---B (4*5=20 marks)
(Answer any four questions.)
6. explain the virtual function with an example.
7. explain the height balanced tree.
8. discuss the process of binary search. Write an algorithm to perform the same.
9. eaplain the default parameter passing in c++ with an example.
10. what short notes on adjacency matrix.
11. what is a stack? Write any two application of stacks.
PART---C (10*2=20 marks)
(Answer all questions)
12. what is a pointer?
13. what is memory management operator?
14. define priority queues
15.explain garbage collection
16.explain hashing
17.what is a graph
18.what is a base class
19.explain templates in c++
20.explain call by value
21.what is type casting ?

------------------------------------------------------------------------------------------------
ACHARYA NAGARJUNA UNIVERSITY
B.SC. SECOND YEAR DEGREE EXAMINATION
JUNE---2006
PART—II: COMPUTER SCIENCE
PART—11: PROGRMING IN C++ AND DATA STRUCTURES
Time: 3 hours maximum: 100 marks
PART-A (3*20=60 marks)
(Answer any three questions)
1. a) what is operator over loading ? write a program to over load unary operator using friend function .
b) give the difference between structers and classes .
2.a)what are the control structers in c++ ? explain with example
b)write a program in c++ to multiply 2 matrices .
3 .a) what is a double linked list and write the procedures for insertion and deletion of an element in double linked list
b)what is a circular linked list ? what are its advantages /disadvantages over a singlw linked list ?
4. a)what is a binary tree ? give the algorithm for traversing a binary tree in pre-order .
b)construct a binary tree where pre-order is EFGHIJ and in-order is JHIGFE.
5. a) define adjacency matrix and give warshall algorithm.
b) give an algorithm for depth first search.
PART---B (4*5=20 marks)
(Answer any four questions.)
6. discuss friend function with example.
7. explain in-line function.
8. implement operation of a stack.
9. write a procedure for breath first search.
10. write an operation of a queue.
11. what is a circlar queue? Give the procedure for deletion in a circular queue.
PART---C (10*2=20 marks)
(Answer all questions)
12. templates in c++.
13. overloading.
14. polymorphism.
15. copy constructor.
16. generic function.
17. virtual function.
18. base class.
19. ADT.
20. Recursion.
21. Binary search tree.
--------------------------------------MARCH---2006 PAPER-------------------------------

ACHARYA NAGARJUNA UNIVERSITY
B.SC. SECOND YEAR DEGREE EXAMINATION
MARCH---2006
PART—II: COMPUTER SCIENCE
PART—11: PROGRMING IN C++ AND DATA STRUCTURES
Time: 3 hours maximum: 100 marks
PART-A (3*20=60 marks)
(Answer any three questions)
1. a) What is a pointer? How the pointer variables are defined in car queue.algorthm,n-order is JHIGFE.deletion of an element in double linked list++? what are the operations that are used on pointers?
b) Write a program to search an element in a list using any searching technique.
2. a) what is polymorphism ? Explain with runtime polymorphism with example.
b) Write a program to sort the given list of number using bubble sort.
3. a) what is a linked list ? Give the stack implementation using linked list.
b) Write an algorithm for addition of 2 polynomial.
4. a) give the recursive tree traversing algorithm for binary tree.
b) Give the in order, pre order sequence for PQRSTUMVMA, QRPTSVUMA.
5. a) what is a graph? Define a cyclic graph and explain the methods used to represent a graph.
b) Give the difference between binary tree search trees.
PART---B (4*5=20 marks)
(Answer any four questions.)
6. Write a program in c++ to count the number of words in a text.
7. Write a short note on encapsulation.
8. Explain virtual base class with example.
9. Write the procedure for DFS.
10. Write the operations to implement a queue.
11. Explain the templates in c++.
PART---C (10*2=20 marks)
(Answer all questions)
12. Logical operator in c++.
13. Overloading.
14. derived class.
15. ADT.
16. Recursion.
17. Base class.
18. out degree of a node in graph.
19. Complete binary tree.
20. Copy constructer.
21. Stack.
------------------------------------JUNE---2005 PAPER--------------------------------------
ACHARYA NAGARJUNA UNIVERSITY
B.SC. SECOND YEAR DEGREE EXAMINATION
JUNE---2005
PART--II: COMPUTER SCIENCE
PART—11: PROGRMING IN C++ AND DATA STRUCTURES
Time: 3 hours maximum: 100 marks
PART-A (3*20=60 marks)
(Answer any three questions)
1. a) What are the data types in c++? Explain with examples.
B) How are relational operators represented in c++? Give examples.
2. a) describe the string operations of the standard class of c++ with examples.
b) Write a program to check whether a given string is palindrome or not.
3. a) what are the rules to be followed on overloading operations?
b) Create a class MAT of size m x n . Define all possible matrix operations for MAT type objects.
4. a) define linear queue as an ADT and implement the operations on queues using arrays.
b) Write a procedure to count the number of elements in a queue.
5. a) define a binary tree and explain various representations of a binary tree.
b) Write a procedure to count the leaf nodes of a binary tree.
PART---B (4*5=20 marks)
(Answer any four questions.)
6. What are the various types of inheritance possible in c++? Explain with examples.
7. What is a file mode? Describe the various file mode options available in c++.
8. Write a program that reads a text file and creates another file that is identical except that every sequence of consecutive blank space is replaced by a single space.
9. Write short notes on exception handling in c++.
10. Write an algorithm for traversing a binary tree in post order.
11. Construct the binary tree whose preorder sequence is A B C D E F G H I and with the in order sequence is B C A E D G F I.
PART---C (10*2=20 marks)
(Answer all questions)
12. virual base class.
13. polymorphism.
14. operator overloading.
15. encapsulation.
16. difference between a while statement and a do- while statement.
17. call by value parameter mechanism.
18. the types of the streams cin and cout.
19. friend functions.
20. adjacency matrix of a graph.
21. stack
----------------------------------------MARCH---2005 PAPER------------------------------
ACHARYA NAGARJUNA UNIVERSITY
B.SC. SECOND YEAR DEGREE EXAMINATION
MARCH---2005
PART--II: COMPUTER SCIENCE
PART—11: PROGRMING IN C++ AND DATA STRUCTURES
Time: 3 hours maximum: 100 marks
PART-A (3*20=60 marks)
(Answer any three questions)
1. a) How are pointer variables defined in c++ ? What are the operators that are used on pointers?
b) Write a program to sort a set of n numbers in ascending order using any sorting algorithm.
2. a) what are the control structures in c++? Explain with examples.
b) Write a program in c++ to multiply two matrices.
3. a) what is a linked list and write procedures for inserting and deleting an element in a linked list.
b) Write an algorithm to multiply two spaces polynomials represented by single lnked list.
4. a) write an algorithm for traversing a binary tree in post order.
b) Construct the binary tree whose pre order sequence is A B C D E F G H I and with the in order sequence is B C A E D G H F I.
5. a) what are the methods used to represent a graph ? Explain.
b) What is difference a graph and a tree? Explain.
PART---B (4*5=20 marks)
(Answer any four questions.)
6. Write a program in c++ to count the number words in a given text.
7. Write short notes on friend functions in c++.
8. Implement the operations on stacks.
9. Write a procedure to find the number of elements of a queue.
10. Write a procedure for depth first search.
11. How many null pointers will be there in the linked representation of a binary tree having n nodes ? justify your answer.
PART---C (10*2=20 marks)
(Answer all questions)
12. Templates in c++.
13. Overloading.
14. Polymorphism.
15. Encapsulation.
16. Logical operations in c++.
17. ADT.
18. Recursion.
19. derived class.
20. in degree of a node in a graph.
21. Binary search tree.

0 comments: