Contents
Section- a (c++ and data structures)
1) Write a c++ program to find the frequency presence of an element in an
array
2) Write a c++ program to insert an element into an array at a given position
3) Write a c++ program to delete an element from an array from a given
position
4) Write a c++ program to sort the element of an array in ascending order
using insertion sort
5) Write a c++ program to search for a given element in an array using binary
search method
6) Write a c++ program to create a class with data members principal, time
and rate create a member function to accept data values, to compute
simple interest and to display the result
7) Write a c++ program to find the area of square/ rectangle/ triangle using
function overloading
8) Write a c++ program to find cube of a number using inline function
9) Create a base class containing the data member 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
10)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
section – b (sql)
1) Generate the electricity bill for one customer
Create a table for house hold electricity bill with the following fields
Rr_no Varchar ( )
Cus_name Varchar ( )
Billing_date Date
Units Number( )
Insert records into the table
1. Check the structure of table and note your observation
2. Add two fields to the table
a. Bill_amt number( , )
b. Due_date date
3. Compute the bill amount for each customer as per the following rules
A Min_amt Rs
B First units Rs /unit
Rs
C > units /unit
4. compute due date as billing_date + days
2) Create a student database and compute the results
Create a table for class of students with the following fields
Id_no Number( )
S_name Varchar ( )
Sub Number( )
Sub Number( )
Sub Number( )
Sub Number( )
Sub Number( )
Sub Number( )
5. Add records into the table for students for student id, student name and marks in subjects using
insert command
6. Display the description of the fields in the table using desc command
7. Alter the table and calculate total and perc_marks
8. Compute the result as “pass” or “fail” by checking if the student has scored more than marks in each
subject
9. List the contents of the table
10. Retrieve all the records of the table
11. List all the bills generated
Section- c html
1) Write a html program to create a study time-table
2) Create an html program with table and form
Viva
1) What is object?
object is real time entity example student, pen, book
2) What is a class?
A class is a collection of data variables and member functions.
3) Mention the access specifiers in c++?
ans: public, private, protected
4) What is an array?
ans: an array is a set of homogeneous elements with the common names and allocated memory
continuously
5) What is inserting an operator with respect to data structure?
ans: adding a new element into an array in a data structure
6) What is deletion operator with respect to data structure?
ans: deleting an element from an array at a given position
7) What is searching?
ans: the process of finding the location of data element from the data structure
8) What is the condition to apply binary search technique to search an element into an array?
ans: the elements should be in a sorted order
9) What is sorting?
ans: sorting me arranging the elements in ascending order or descending order
10) Give an example of the primitive data structure
ans: integer, character, float, pointer
11) Give an example for a linear data structure
ans: array, stack, queue, linked list
12) Give an example for a non-linear data structure
ans: trees and graphs
13) What is function overloading?
ans: it me using same name for more than one function, but it should differ in number of arguments and
types of arguments
14) What is an inline function?
ans: the inline function is a shortest function which contains function call along with function code the
keyword ‘inline’ is used to define the inline function
15) What is inheritance?
ans: inheritance is a property from which one class is derived from another class
16) What is a base class?
ans: it is a class which is used to derive another class it is also called as super class or parent class
17) What is derived class?
ans: it is a class which is derived from another class it is also called as sub class or child class
18) Mention the operator used to create a derived class in c++
ans: (ans:) “colon”
19) What is a pointer?
ans: pointer is a variable which stores the address of an another variable
20) Mention the address operator in c++
ans: & (address of)
21) Which operator is used to allocate memory dynamically?
ans: new
22) Which operator is used to deallocate memory dynamically?
ans: delete
23) Mention any one web browser
ans: chrome, google
24) Mention the text formation tags in html
ans:<big>, <small>, <font>
25) What is the purpose of tr tag in html
ans: tr tag is used to display the table row in a table
26) What is dhtml?
ans: dynamic hypertext markup language it is an extension of html which enables a web page to response
to an user input without sending respect to a web server
27) Which command is used to add new columns to the existing table
ans: alter table
28) Which command is used to count the number of records in a table
ans: count ()
29) Differentiate between drop and delete command in sql
ans: dropans: - it is used to delete complete table along with its data
deleteans: - it is used to delete a particular row or column in a table
30) Which clause in sql is used to sort the records based on one or more columns
ans: update command
31) Which command is used to modify the records of the table
ans: order by
32) Mention the ddl commands in sql
ans: create, alter, drop
33) Mention the dml commands in sql
ans: select, insert, delete and update
34) Which command is used to retrieve the records of the table?
ans: select
35) Which are the goup functions in sql?
Min max count avg
36) Scalar functions in sqlans:
Pow,sqrt,sin,cos