Professional Documents
Culture Documents
Computer Science Viva Voce Question PDF
Computer Science Viva Voce Question PDF
Q. 1. Differentiate between a run-time error and syntax error. Give one example of each.
Q. 2. Differentaite between a data type struct and a data type class in C++. What is the need for a
constructor function in an object.
[Hint : Yes]
Q. 5. Write any two differences between Procedural Programming and Object Oriented
Programming.
Q. 6. What is a pointer?
Q. 7. What is a Queue?
[Hint : LIFO]
[Hint : Remark]
Q. 13. What are constructors & destructors. What purpose do they serve.
Q. 15. What is the pre-condition for Binary Search to be performed on a single dimensional
array? [Hint : sorting]
[Hint : String]
Q . 17. Differentiate between the privately & publicly derived visibility modes.
[Hint : Arranys]
Q. 23. Differentiate between static data structure & dynamic structure.
[Hint : OOP]
[Hint : Function]
Q. 26. Write two major differences between Object Oriented Programming and Procedural
Programming.
[Hint : BASIC&C++]
Q. 27. What do you understand by constructor and destructor functions used in classes. How are
these functions different from other member functions.
[Hint : Reading/Writing]
Q. 30. What do you understand by visibility modes in class derivations. What are these modes.
Q. 33. What do you understand by default constructor and copy constructor functions used in
classes? How are these functions different from normal constructors?
Q. 35. Illustrate the concept of Function Overloading with the help of an example.
Q.36. Illustrate the use of the this pointer with the help of an example.
Q. 37. Encapsulation is one of the major properties of OOP. How is it implemented in C++.
Q. 38. Illustrate the use of “Self Referential Structures” with the help of an example.
Q. 39. Reusability of classes is one of the major properties of OOP. How is it implemented in
C++.
Q .40. Distinguish between: int*ptr=new int(5); & int * ptr= new int[5];
Q. 43. What do you understand by a Base Class and a Derived Class. If a base class and a
derived class each include a member function with the same name and arguments, which
member function will be called by the object of the derived class if the scope operator is not
used.
[Hint : Polymorphism]
[Hint : NO]
[Hint : „g‟]
[Hint : (a)]
[Hint : loop]
[Hint : Arrays]
void afunction()
{
if(1)
{
break;
a_function();
cout<<“Err”; } }
Q. 54. Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element
array? (Or go to lunch...)
What would be output if the value entered for n was 0? What would be the effect of reversing the
order of the statements in the loop body on the general result produced by the algorithm?
Q. 56. If an array has a 100 elements what is the allowable range of subscripts?
Q. 58. Write a declaration for a 100 element array of floats. Include an initialisation of the first
four elements to 1.0, 2.0, 3.0 and 4.0.
int A[10], i;
for (i=1; i<=10; i++) cin >> A[i];
Q. 62. Write a function heading for a function which will double the first n elements of an array.
If the function was amended so that it would return false if n was larger than the size of the array
how should the function heading be written? If the function was to be changed so that a new
array was produced each of whose elements were double those of the input array how would the
heading be written?
{
x=new int;
*x=12;
}
int main()
{
int v=10;
afunction(&v);
cout<
a. auto
b. register
c. static
a. iostream.h
b. fstream.h
c. fileio.h
a. 16
b. 17
c. 16.5
[Hint : Process]
[Hint : Clrscr]