CLASS 12 CS VIVA VOCE QUESTIOS FOR BOARD PRACTICAL EXAMS
VIVA-VOCE QUESTIONS
FOR C++ CLASS XII
VIVA_VOCE QUESTIOS FOR BOARD PRACTICAL EXAMS
UNIT –I : PROGRAMMING IN C++
Q.1 Define following terms Array, Structure, Class, data-hiding, data abstraction, polymorphism, inheritance, pointers, constructor, destructor, parameterized constructor, default constructor, copy constructor, temporary instance, library functions and their header files.
Q.2 Differentiate between ‘IS-A’ , ‘HAS-A’ and ‘HOLDS-A’ relationship in inheritance .
Q.3 What are visibility modes ? Differentiate between them.
Q.4 Define various types of inheritance .
Q.5 How is memory allocated to data members and member function?
Q.6 What is static data member and static member function. What is its use ?
Q.7 How are constructor and destructor executed in inheritance ?
Q.8 How are data-hiding, data-abstraction, encapsulation, polymorphism implemented in c++.
Q.9 What contributes to function overloading – function signatures or return type of function.
Q.10 Difference between array and structures, array and classes
Q.11 Pre-processor directives- #include and #define. NOTE : REVISE CLASS XI C++ PROGRAMMING DATA FILE HANDLING
Q.1 Use of data-files.
Q.2 Definition of stream, different stream classes, member functions of these stream classes. Significance of ios flags.
Q.3 difference between text and binary files, get() and read() functions, put() and write() functions
Q.4 use and significance of seekg(),seekp(),tellg(),tellp(),
Q.5 how does eof() works.
UNIT –II : DATA STRUCTURES
Q.1 Differentiate between arrays, stacks and queues.
Q.2 Application of stacks and queues.
Q.3 Merits and demerits of linear and binary search, bubble, selection and insertion sort.
Q.4 Allocation and de-allocation operator new and delete.
Q.5 Linked list, linked stack, linked queue, circular queue, doubly linked queue.
UNIT –III SQL AND DATABASES
Q.1 Definition of database,relation,,DBMS,RDBMS, domain, field, tuple, attribute, cardinality, degree, primary key, alternate key.
Q.2 Operations on relation – selection, projection, union ,Cartesian product
Q.3.Difference between create table and alter table , create table and create view commands, delete table and drop table.
Q.4 Group functions – sum(), max(), min(), avg(), count()
Q.5 Differentiate between DDL and DML commands with example.
UNIT-IV BOOLEAN ALGEBRA
Q.1 Universal gates – NAND and NOR . Why are they called universal gates.
Q.2 Main theorems of Boolean Algebra, principle of duality
UNIT –V COMMUNICATION AND NETWORKING
Q.1 Definitions of network, Internet, switching techniques-Circuit, Message, Packet, Transmission media- Twisted, coaxial cable, optical fibre, micro wave, radio wave, satellite, baud rate, bandwidth,LAN,MAN,WAN,totplogies,hub,switch,router,bridge,repeater,firewall,cookies
Q.2 FULL forms of HTTP, FTP,TCP/IP,SLIP/PPP, MODEM,CDMA,WLL,SMS,WWW,URL
UNIT –I : PROGRAMMING IN C++
Q.1 Define following terms Array, Structure, Class, data-hiding, data abstraction, polymorphism, inheritance, pointers, constructor, destructor, parameterized constructor, default constructor, copy constructor, temporary instance, library functions and their header files.
Q.2 Differentiate between ‘IS-A’ , ‘HAS-A’ and ‘HOLDS-A’ relationship in inheritance .
Q.3 What are visibility modes ? Differentiate between them.
Q.4 Define various types of inheritance .
Q.5 How is memory allocated to data members and member function?
Q.6 What is static data member and static member function. What is its use ?
Q.7 How are constructor and destructor executed in inheritance ?
Q.8 How are data-hiding, data-abstraction, encapsulation, polymorphism implemented in c++.
Q.9 What contributes to function overloading – function signatures or return type of function.
Q.10 Difference between array and structures, array and classes
Q.11 Pre-processor directives- #include and #define. NOTE : REVISE CLASS XI C++ PROGRAMMING DATA FILE HANDLING
Q.1 Use of data-files.
Q.2 Definition of stream, different stream classes, member functions of these stream classes. Significance of ios flags.
Q.3 difference between text and binary files, get() and read() functions, put() and write() functions
Q.4 use and significance of seekg(),seekp(),tellg(),tellp(),
Q.5 how does eof() works.
UNIT –II : DATA STRUCTURES
Q.1 Differentiate between arrays, stacks and queues.
Q.2 Application of stacks and queues.
Q.3 Merits and demerits of linear and binary search, bubble, selection and insertion sort.
Q.4 Allocation and de-allocation operator new and delete.
Q.5 Linked list, linked stack, linked queue, circular queue, doubly linked queue.
UNIT –III SQL AND DATABASES
Q.1 Definition of database,relation,,DBMS,RDBMS, domain, field, tuple, attribute, cardinality, degree, primary key, alternate key.
Q.2 Operations on relation – selection, projection, union ,Cartesian product
Q.3.Difference between create table and alter table , create table and create view commands, delete table and drop table.
Q.4 Group functions – sum(), max(), min(), avg(), count()
Q.5 Differentiate between DDL and DML commands with example.
UNIT-IV BOOLEAN ALGEBRA
Q.1 Universal gates – NAND and NOR . Why are they called universal gates.
Q.2 Main theorems of Boolean Algebra, principle of duality
UNIT –V COMMUNICATION AND NETWORKING
Q.1 Definitions of network, Internet, switching techniques-Circuit, Message, Packet, Transmission media- Twisted, coaxial cable, optical fibre, micro wave, radio wave, satellite, baud rate, bandwidth,LAN,MAN,WAN,totplogies,hub,switch,router,bridge,repeater,firewall,cookies
Q.2 FULL forms of HTTP, FTP,TCP/IP,SLIP/PPP, MODEM,CDMA,WLL,SMS,WWW,URL
Q. 1. Define
any two features of OOPs. Also give suitable example in C++.
Q. 2. (a)
Name the Header file(s) that shall be needed for successful compilation of the
following
C++ code
void
main()
{
int a[10];
for(int i=0;i<10;i++)
{
cin>>a[i];
if(a[i]%2==0)
a[i]=pow(a[i],3);
else
a[i]=sqrt(a[i]);
if(a[i]>32767)
exit(0);
}
getch();
}
{
int a[10];
for(int i=0;i<10;i++)
{
cin>>a[i];
if(a[i]%2==0)
a[i]=pow(a[i],3);
else
a[i]=sqrt(a[i]);
if(a[i]>32767)
exit(0);
}
getch();
}
(b).
Rewrite the following program after removing syntactical error(s) if any.
Underline each correction.
#include
type def int integer;
struct number
{
integer a [5];
}
void main()
{
number x;
for(int i=0;i<5;i++)
cin>>x[i].a;
getch();
}
#include
type def int integer;
struct number
{
integer a [5];
}
void main()
{
number x;
for(int i=0;i<5;i++)
cin>>x[i].a;
getch();
}
(c).
Find the output of the following program :
#include
#include
void main()
{
char *a[2]={”Amit”,”Sumit”};
for(int i=0;i<2;i++)
{
int l=strlen(a[i]);
for(int j=0;j
cout<<*a[i]<<” : “;
cout<
}
}
#include
void main()
{
char *a[2]={”Amit”,”Sumit”};
for(int i=0;i<2;i++)
{
int l=strlen(a[i]);
for(int j=0;j
cout<<*a[i]<<” : “;
cout<
}
}
(d).
Find the output of the following program
#include
class student
{
public:
student()
{
cout<<”\n Computer Science“;
}
~student()
{
cout<<” subject”;
}
}st;
void main()
{
cout<<” is my best“
}
class student
{
public:
student()
{
cout<<”\n Computer Science“;
}
~student()
{
cout<<” subject”;
}
}st;
void main()
{
cout<<” is my best“
}
(e). In
the following C++ program , what will the maximum and minimum value of r
generated with the help of random function.
#include
#include
void main()
{
int r;
randomize();
r=random(20)+random(2);
cout<
}
(f) Define macro with a suitable example.
#include
void main()
{
int r;
randomize();
r=random(20)+random(2);
cout<
}
(f) Define macro with a suitable example.
Q. 2. (a).
Differentiate between a Constructor and Destructor in context of class and
object . Give suitable example in C++.
(b).
Answer the questions (i) and (ii) after going through the following class :
class Computer
{
char C_name[20];
char Config[100];
public:
Computer(Computer &obj); // function1
Computer(); //function 2
Computer(char *n,char *C); // function3
};
char C_name[20];
char Config[100];
public:
Computer(Computer &obj); // function1
Computer(); //function 2
Computer(char *n,char *C); // function3
};
a.
Complete the definition
of the function 1.
b. Name
the specific feature of the OOPs shown in the above example.
(c).
Define a class Student in C++ with the description given below :
private
members
rno integer
name array of 40 characters
address array of 40 characters
marks array of 5 integers
percentage float variable
calper() a function which will calculate & return the percentage of a student.
rno integer
name array of 40 characters
address array of 40 characters
marks array of 5 integers
percentage float variable
calper() a function which will calculate & return the percentage of a student.
public
members
init()
function to ask and store the values of rno, name, address and marks in 5
subjects.
display() function to which will invoke calper () and display the details of the item in the following format :
display() function to which will invoke calper () and display the details of the item in the following format :
MARK
SHEET
Roll No :
Name :
Address :
Roll No :
Name :
Address :
Marks : <….subject 5 marks>
Percentage :
Also create main() function which will invoke all the public member functions.
(d).
Answer the questions (i) to (iv) based on the following code :
class
Employee
{
int id;
protected :
char name[20];
char doj[20];
public :
Employee();
~Employee();
void get();
void show();
};
class Daily_wager : protected Employee
{
int wphour;
protected :
int nofhworked;
public :
void getd();
void showd();
};
class Payment : private Daily_wager
{
{
int id;
protected :
char name[20];
char doj[20];
public :
Employee();
~Employee();
void get();
void show();
};
class Daily_wager : protected Employee
{
int wphour;
protected :
int nofhworked;
public :
void getd();
void showd();
};
class Payment : private Daily_wager
{
char
date[10];
protected :
int amount;
public :
Payment();
~Payment();
void show();
};
protected :
int amount;
public :
Payment();
~Payment();
void show();
};
i.
Name the type of
Inheritance depicted in the above example.
ii.
Name the member functions
accessible through the object of class Payment.
iii.
From the following,
Identify the member function(s) that can be called directly from the object of
class Daily_wager class
show()
getd()
get()
show()
getd()
get()
iv.
Name the base &
derived class of Daily_wager class.
Q. 3. (a)
Write a function in C++ which accepts a integer array and its size as an
arguments and prints the output (using nested loops) in following format :
Example
: if the array is having
1 2 4 5 9
1 2 4 5 9
Then
the output should be
1
2 2
4 4 4 4
5 5 5 5 5
9 9 9 9 9 9
1
2 2
4 4 4 4
5 5 5 5 5
9 9 9 9 9 9
(b). An
array A[10][20] is stored in the memory with each element occupying 2 bytes of
storage. If the Base address of array in the memory is 800 , determine the
location of A[9][10] when the array is stored as (i) Row Major (ii) column
major.
(c).
Write a function in C++ to delete a node containing names of student , from a
dynamically allocated Queue of names implemented with the help
of following structure :
of following structure :
struct
student
{
char name[20];
student *next;
{
char name[20];
student *next;
}*front
, *rear;
(d).
Consider the following portion of a program , which implements a linked
stack
for Library . Write the definition of function PUSH(),to insert a new node in
the stack with required information struct Library
{
int id;
char names[20];
};
class stack
{
Library *top;
public :
stack()
{
top=NULL;
}
void PUSH();
void POP();
};
int id;
char names[20];
};
class stack
{
Library *top;
public :
stack()
{
top=NULL;
}
void PUSH();
void POP();
};
(e).
Convert the following infix expression into postfix. show the stack status
after execution of each operation:
TRUE OR
FALSE AND NOT FALSE OR FALSE
Q. 4. (a).
Differentiate between ios::app and ios::ate file opening modes.
(b).
Write a function in C++ which will print the size of a text file “story.txt” in
the form of bytes.
(c).
Write a function in C++ which will increase the qty of a particular type of
item from the file “stock.dat” . Assuming that the binary file is containing
the records of following structure :
struct
Products
{
int id;
char Iname[30];
int type;
int qty;
};
{
int id;
char Iname[30];
int type;
int qty;
};
Q. 5. (a).
What do you understand by Primary Key
(b).
Consider the following tables Employee and salary. Write SQL commands
for the
statements (i) to (iv) and give outputs for SQL queries (v) to (viii)
Table :
Employee
Eid
|
Name
|
Deptid
|
Qualification
|
Sex
|
1
|
Deepali
Gupta
|
101
|
MCA
|
F
|
2
|
Rajat
Tyagi
|
101
|
BCA
|
M
|
3
|
Hari
Mohan
|
102
|
B.A
|
M
|
4
|
Harry
|
102
|
M.A
|
M
|
5
|
Sumit
Mittal
|
103
|
B.Tech
|
M
|
6
|
Jyoti
|
101
|
M.Tech
|
F
|
Table :
Salary
Eid
|
Basic
|
DA
|
HRA
|
Bonus
|
1
|
6000
|
2000
|
2300
|
200
|
2
|
2000
|
300
|
300
|
30
|
3
|
1000
|
300
|
300
|
40
|
4
|
1500
|
390
|
490
|
30
|
5
|
8000
|
900
|
900
|
80
|
6
|
10000
|
300
|
490
|
89
|
a. To
display the frequency of employees department wise.
c.
To add a new column in
salary table . the column name is total_sal.
d. To
store the corresponding values in the total_sal column.
e.
Select name from employee
where eid=(select eid from salary where basic= (select max(basic) from
salary));
f.
select max(basic) from
salary where bonus >40;
g. Select
count(*) from employee group by sex;
h. select
Distinct deptid from Employee;
Q. 6. (a)
State and prove the Distributive law algebraically.
(b).
Write the equivalent POS expression of following SOP form
F
(x,y,z)= ∑ (0,2,4,6)
(c).
Draw the Logical circuit of the following expression with the help of NAND gate
only
x+yz
(d).
Obtain the simplified form of a Boolean expression using K-Map.
F(a,b,c,d)=∑(0,1,2,3,4,7,11,12,14)
Q. 7. (a).
What do your understand by Hackers?
(b).
Differentiate between Internet & Intranet
(c).
Expand the following terminology :
1.
SMS
2. FTP
(d).
Define Repeater.
Comments
Post a Comment