Professional Documents
Culture Documents
Department of Computer Science and Engineering Question Bank
Department of Computer Science and Engineering Question Bank
1
26.What is a default argument and constant argument?
27.State the difference between inline function and macro.
28.Write the Block Structure of C++.
29.What is function? What are the types of function in C++?
30.What is polymorphism? What are the types of polymorphism?
31.What is a function prototype? Give its specification.
32.What are the features of inline function?
PART B & PART C
1. List out differences between procedures oriented and object oriented programming. (MAY/JUNE
2016) (NOV/DEC 2016) (APR/MAY 2017)
2. Explain the major principles of Object Oriented Programming with illustrations and neat
diagram(APR/MAY 2015) (NOV/DEC 2015)
3. Explain the characteristics of OOPs. (MAY/JUNE 2016) (NOV/DEC 2016) (APR/MAY 2017)
4. List out the applications of OOPs (NOV/DEC 2016)
5. Explain about pointers with an example. (MAY/JUNE 2016)
6. Write a C++ program to list out prime numbers between the given two limits (MAY/JUNE 2016)
(NOV/DEC 2016)
7. Explain the various operators available in C++. (APR/MAY 2015) (APR/MAY 2017) (NOV/DEC 2017)
8. Explain about dynamic allocation in C++ (APR/MAY 2017)
9. Explain the switch statement in C++ with examples (NOV/DEC 2017)
10. Write a C++ program to implement a binary search procedure to find whether the given element is
present in the array or not using objects and classes.NOV/DEC 2015
11. Write short notes on casting primitive data types to object type and vice verse with an example for
each. NOV/DEC 2015
12. What is namespace? How do you resolve the name conflicts using namespaces? Explain with an
example. NOV/DEC 2015
13. Write a C++ program to find maximum of two numbers using inline functions. NOV/DEC 2015
14. Write a C++ program to find the area of the square, rectangle, circle using function overloading.
NOV/DEC 2015
15. Write a note on terms and concepts related object oriented programming. b) How it differs from
procedural programming. c) Explain the merits and demerits of the same. APRIL/MAY-14
16. Write a C++ program to construct student mark list for three subjects. Write the program to display
name, rollno, marks, avg and total. Use class and objects.
17. Explain the concept of passing the arguments by call by value and call by reference.
18. Explain the following concepts of object oriented programming in detail with an example.
19. Explain the implementation of ADT with some suitable example.
50 - 59 1-10 1-5
60 – 79 1-15 1-10
UNIT II
BASIC CHARACTERISTICS OF OOP
2
SYLLABUS: Data Hiding and Member Functions- Object Creation and Destruction- Polymorphism
data abstraction: Iterators and Containers.
PART A: (2 MARKS)
1. What are constructors? Explain the concept of destructor with an example. (MAY/JUNE 2016)
(NOV/DEC 2016)
3
2. Explain the various types of constructors that are available in C++ with suitable examples.
(APRIL/MAY 2015 ) (NOV/DEC 2017)
3. Distinguish between i) inheritance and containership ii) Encapsulation and abstraction.
(APR/MAY 2017)
4. Write a C++ program to find whether the given string is palindrome or not (APR/MAY 2017).
5. What is meant by polymorphism? Explain the various types of polymorphism in C++ with suitable
example(APR/MAY 2015) (NOV/DEC 2017)
6. List out the advantages of overloading. (APR/MAY 2017)
7. Write the need for Iterators in c++ with an example (NOV/DEC 2017)
8. Explain function overloading in C++ with an example (NOV/DEC 2015) (NOV/DEC 2016)
9. Write a C++ program to overload + operator to add two complex numbers. (NOV/DEC 2016)
10. Write a C++ program to overload + operator for concatenating two strings(APR/MAY 2017)
11. Write a C++ program to add two vectors using + operator overloading. (MAY/JUNE 2016)
12. Explain array of objects with an example. (MAY/JUNE 2016)
13. What is operator overloading? List out the rules to overload a binary operator. (MAY/JUNE 2016)
14. Explain the need for iterators using sufficient examples. (NOV/DEC 2016)
15. Develop a class polynomial whose internal representation is a term consisting of coefficient and an
exponent. Develop a complete class containing proper constructor and destructor functions as well
as set and get functions. Overload the additions and subtraction operator to add and subtract tow
polynomials and display the results. Overload the assignment operator to assign one polynomial to
another using friend function. NOV/DEC 2015
16. Develop an abstract class polygon from which triangle and rectangle are derived. Each polygon
should contain the function area () to calculate the area of them. Invoke appropriate area ()
function to calculate the area using pointer to base class and pointers to derived classes. NOV/DEC
2015
17. Explain the Friend function concept with an example program. May13,Dec13
18. Explain in detail with examples the application of constructors and destructors. Nov/Dec 2011
19. Explain function overloading with an example program. May-10, Dec-11
20. Explain in detail about operator overloading with C++ coding. Dec 10,11,12,13,May-12,13,14
21. Write a C++ program to implement C=A+B,C=A-B and C=A*B where A,B and C are objects
containing a int value(vector). Dec-11,May-12
22. Write a C++ program to define overloaded constructor to perform string initialization, string copy
and string destruction. May-11,12.
23. Write note on Virtual functions with example program. May-16
24. Describe manipulation of strings with overloading the following operators: <<,>>,+,-.
50 - 59 1-10 1-6
60 – 79 1-15 1-14
UNIT III
ADVANCED PROGRAMMING
4
PART A: (2 MARKS)
1. What is inheritance? List out the advantages of inheritances? (APR/MAY 2015) (MAY/JUNE 2016)
(APR/MAY 2017)
2. Write a C++ program to implement multiple inheritance(NOV/DEC 2015) (MAY/JUNE 2016)
(NOV/DEC 2016) (APR/MAY 2017)
3. Discuss about exceptions and its advantages. (MAY/JUNE 2016)
4. Write a C++ program to generate user defined exception whenever user inputs odd numbers
(NOV/DEC 2016)
5. Write a C++ program to generate an exception whenever user input is even number less than 100.
(MAY/JUNE 2016).
6. Write a JAVA program to create user defined exception. (APR/MAY 2017)
7. List out the advantages of generic programming. (NOV/DEC 2016)
8. Explain function templates with an example. (APR/MAY 2015) (NOV/DEC 2016) (APR/MAY 2017)
9. Implement a dictionary name Index which consists of key terms and its descriptions using MAP
STL. Try to display all the terms and descriptions present in the dictionary and if a key term has
been provided as an input, the corresponding description should get displayed as an output to the
user by searching the entire dictionary. Nov/Dec 2015
5
10. Implement a circular queue with proper insertion and deletion operations using class templates.
Nov/Dec 2015
11. Write a C++ program to accept integer or string values from the user within a specified range. If
the input violates the range, appropriate exception needs to be raised. Nov/Dec 2015
12. Write a C++ program to sort a list of integers, floating point numbers and characters by quick sort
mechanism using function templates. Nov/Dec 2015
13. Write short notes on the storage structures available with standard template libraries. Nov/Dec
2015
14. Explain virtual function concept with a program to find the distance between two objects. May-
10,11,Dec-11,12
15. Explain the inheritance types with example programs for last three types.
a) State the rules for virtual functions. Write a C++ program to declare a virtual function and
demonstrate it. May-10,Dec-11
b) Explain about implementation of runtime polymorphism in C++ with an example. Dec-12
16. Explain how stack can be implemented using STL.
17. Draw the I/O stream hierarchy in C++ and explain it clearly.
50 - 59 1-10 1-4
60 – 79 1-15 1-10
UNIT IV
OVERVIEW OF JAVA
SYLLABUS: Data types, variables and arrays, operators, control statements, classes, objects, methods
– Inheritance
PART A: (2 MARKS)
1. What is byte code? (APR/MAY 2015) (MAY/JUNE 2016) (APR/MAY 2017)
2. Highlights the features of JAVA (NOV/DEC 2017)
3. What is JVM? (APR/MAY 2015)
4. Define the keyword ‘static’ in JAVA(NOV/DEC 2015)
5. Java is platform independent language Comment( NOV/DEC 2016) (APR/MAY 2017)
6. Distinguish between class and interface ( NOV/DEC 2016)
7. Java is robust. Comment(MAY/JUNE 2016)
8. Which operators could be overloaded only by friend function? (APR/MAY 2017)
9. Give syntax for while statement in JAVA (NOV/DEC 2017)
10. Differentiate Checked and Unchecked exceptions. (NOV/DEC 2015)
11. Is JVM’s platform independent? Justify. May-13
12. How do we allocate an array dynamically in Java? May-13
13. State the use of super keyword in java. Dec-11
14. What is inner class? Dec-12
15. What is the difference between superclass and subclass? May-13
16. What are wrapper classes in Java? Dec-11
6
17. Why does java make an executable file? Dec-12
18. Give two examples of java modifiers. Dec-10
19. What is mean by platform? Java is platform independent language. Justify.
20. What is meant by Java Application?
21. What is meant by Java Applet?
22. What are features supported and does not support by java?
23. How multiple inheritances are achieved in java?
24. What is by java? What are the features of java?
25. What are the two components of Java platform?
26. What are the components of JVM?
27. Write down the block structure of JAVA?
28. Write class declarations for the following relationship, assuming that all classes are public:
Bulldog is a kind of dog and a Dog is a kind of animal.
29. Mention the various access levels supported in java.
30. What is an array?
31. Why java use Unicode?
7
20. Grades for research scholars would be computed based on the number of research articles
published and number of research project done. Tyr to implement the above system
polymorphically.
50 - 59 1-10 1-6
60 – 79 1-15 1-13
UNIT V
EXCEPTION HANDLING
PART A: (2 MARKS)
1. What is an interface? (APR/MAY 2015)
2. Distinguish between interface and class(MAY/JUNE 2016) ( NOV/DEC 2016)
3. Write short notes on throw().(APR/MAY 2015)
4. What is Multithreading? (MAY/JUNE 2016)
5. What is the use of Multithreading? (NOV/DEC 2016)
6. What is a package?
7. What is meant by Exception? Nov/Dec 2011
8. List any four packages in java and highlight their features. May-10
9. What are packages? May-11,12
10. Define interfaces. State its use. May-11,12
11. What is the difference between an interface and an abstract class? Dec-12
12. What is API package? May-14
13. What is the difference between throw and throws? Dec-12
14. What are the two ways of creating java threads ? Dec-10,May-14
15. What is thread? How does it differ from a process? May-11,12
16. Which class and interface in java is used to create thread and which is the most advantageous one?
17. What is the difference between superclass and subclass? May-13
18. Write the methods of threads? May-14
19. What are the advantages of using exception handling? May-13
20. Name two superclasses used in character stream.
21. What is the purpose of BufferedInputStream and BufferedOutputStream classes?
22. Name two super classes used in byte stream.
23. How threads are created in java?
24. What is thread pool?
25. How an exception is handled in java?
8
26. What is life cycle of thread?
27. What is the use of data input and output streams?
1. How to define an interface? Why do the members of interface are static and final? (MAY/JUNE
2016)
2. Explain the use of packages in java with an illustrative example ( NOV /DEC 2017)
3. Develop Java program to implement an interface with an example ( NOV/DEC 2017)
4. How do you add an interface to a package? Explain with example. (NOV/DEC 2016) (APR/MAY 2017)
5. What are the major difference between an interface and a class(APR/MAY 2017)
6. Explain multithreading with an example. (APR/MAY 2015) (NOV/DEC 2016) ( NOV/DEC 2017 )
7. Write a Java program to implement nested packages(MAY/JUNE 2016) (APR/MAY 2017)
8. How exceptions are handled in JAVA? Explain the important methods used to handle exception.
(NOV/DEC 2016)
9. Distinguish between arrays and strings. (MAY/JUNE 2016)
10. Explain the methods available in the String Buffer Class. (MAY/JUNE 2016) (NOV/DEC 2016)
11. Explain the use of command line arguments with an example. (MAY/JUNE 2016)
12. Explain about thread synchronization with an example. (APR/MAY 2017)
13. Create an application that executes two threads. First thread displays the alphabets A to Z at every
one second. The second thread will display the alphabets Z to A at every two seconds. Both the
threads need to synchronize the each other for printing alphabets. The second thread has to wait
until the first thread finishes its execution. The applicable waits for all the threads to finish the
execution. Nov/Dec 2015.
50 - 59 1-10 1-4
60 – 79 1-15 1-10