II PUC - Viva Q & A
II PUC - Viva Q & A
II PUC - Viva Q & A
VIVA QUESTIONS
(TO BE ASKED BASED ON THE PROGRAMS)
PART – A (C++)
1. Write a program to find the frequency of presence of an element in an array.
2. Write a program to create a class with data member principal, time and rate. Create member
functions to accept data values to compute simple interest and to display the result.
3. Write a program to create a class with data members a, b, c and member functions to input
data, compute the discriminant based on the following conditions and print the roots.
- If discriminant=0, print the roots that are equal
- If the discriminant is>0, print the real roots
- If the discriminant is<0, print that the roots are imaginary.
10. Write a program to find the sum of the series 1+x+x2+...+xn using constructor.
11. Create a base class containing the data members roll number and name. Also create a member
function to read and display the data using the concept of single level inheritance. Create a
derived class that contains marks of two subjects and total marks as the data members.
12. Create a class containing the following data members register No., name and fees. Also create
a member function to read and display the data using the concept of pointers to objects.
(SQL)
PLEASE NOTE : 1. Definition based questions – Any valid / relevant definitions can be
considered.