2nd PU CS Lab-Manual
2nd PU CS Lab-Manual
Program Page
Program Name
No No
SECTION- A (C++ AND DATA STRUCTURES)
01 Write a C++ program to find the frequency presence of an element in an array. 01
02 Write a C++ program to insert an element into an array at a given position. 03
03 Write a C++ program to delete an element from an array from a given position. 05
Write a C++ program to sort the element of an array in ascending order using
04 07
insertion sort.
Write a C++ program to search for a given element in an array using binary search
05 09
method.
Write a C++ program to create a class with data members principal, time and rate.
06 Create a member function to accept data values, to compute simple interest and to 11
display the result.
Write a C++ program to create a class with data members a, b, c and member
functions to input data, compute the discriminates based on the following conditions
and print the roots.
07 13
➢ If discriminates = 0, print the roots are equal and their value.
➢ If discriminates > 0, print the real roots and their values.
➢ If discriminates < 0, print the roots are imaginary and exit the program.
Write a C++ program to find the area of square/ rectangle/ triangle using function
08 15
overloading.
12 Also create a member function to read and display the data using the concept of 22
pointers to objects.
1. Add records into the table for 10 students for Student ID, Student Name and
marks in 6 subjects using INSERT command.
02 2. Display the description of the fields in the table using DESC command. 35
3. Alter the table and calculate TOTAL and PERC_MARKS.
4. Compute the RESULT as “PASS” or “FAIL” by checking if the student has
scored more than 35 marks in each subject.
5. List the contents of the table.
6. Retrieve all the records of the table.
7. Retrieve only ID_NO and S_NAME of all the students.
8. List the students who have result as “PASS”.
9. List the students who have result as “FAIL”.
10. Count the number of students who have passed.
11. Count the number of students who have failed.
12. List the students who have percentage greater than 60.
13. Sort the table according to the order of ID_NO.
Generate the Employee details and compute the salary based on the department.
Create the following table EMPLOYEE
Field Name Type
EMP_ID NUMBER(4)
DEPT_ID NUMBER(2)
EMP_NAME VARCHAR2(15)
EMP_SALARY NUMBER(5)
Assume the DEPARTMENT names as Purchase (Id-01), Accounts (Id-02), Sales (Id-
03 03), and Apprentice (Id-04) 39
Enter 10 rows of data for table EMPLOYEE and 4 rows of data for DEPARTMENT
table.
Write the SQL statements for the following:
1. Find the names of all employees who work for the Accounts department.
2. How many employees work for Accounts department?
3. What are the Minimum, Maximum and Average salary of employees working for
Accounts department?
4. List the employees working for particular supervisor.
5. Retrieve the department names for each department where only one employee
works.
6. Increase the salary of all employees in the sales department by 15%.
7. Add a new Colum to the table EMPLOYEE called BONUS NUMBER (5) and
compute 5% of the salary to the said field.
8. Delete all the rows for the employee in the Apprentice department.
SECTION- C HTML
1|Page
clrscr( );
f.readdata( );
f.findfreq( );
f.display( );
getch( );
}
OUTPUT 1:
OUTPUT 2:
2|Page
PROGRAM 2:
void Insertion::readdata( )
{
cout<<"Enter the size of the array"<<endl;
cin>>n;
cout<<"Enter the elements for the array"<<endl;
for(i=0; i<n; i++)
cin>>a[i];
cout<<"Enter the position of the element in the array"<<endl;
cin>>pos;
cout<<"Enter the element to be inserted"<<endl;
cin>>ele;
}
void Insertion::insert( )
{
if(pos>n)
{
cout<<"Out of array limits!!!";
getch( );
exit(0);
}
else
{
for(i=n; i>=pos; i--)
a[i+1] = a[i]; // Shift array elements
a[pos] = ele; // Insert the given element
n = n+1; // Size of the array is incremented by 1
3|Page
}
}
void Insertion::display( )
{
cout<<"Array elements after insertion are:"<<endl;
for(i=0; i<n; i++)
cout<<a[i]<<"\t";
}
void main( )
{
Insertion i;
clrscr( );
i.readdata( );
i.insert( );
i.display( );
getch( );
}
OUTPUT 1:
OUTPUT 2:
4|Page
PROGRAM 3:
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
class Deletion
{
private:
int a[10], n, pos, i;
public:
void readdata( );
void delet( );
void display( );
};
void Deletion::readdata( )
{
cout<<"Enter the size of the array"<<endl;
cin>>n;
cout<<"Enter the elements for the array:"<<endl;
for (i=0; i<n; i++)
cin>>a[i];
cout<<"Enter the position to an delete an element:\n";
cin>>pos;
}
void Deletion::delet( )
{
if(pos>n)
{
cout<<"Out of array limits...!!!";
getch( );
exit(0);
}
else
{
for(i=pos; i<n; i++)
a[i] = a[i+1]; // Move higher position element
n = n-1; // Reduce size of the array by 1
}
}
5|Page
void Deletion::display( )
{
cout<<"After deletion the array elements are"<<endl;
for(i=0; i<n; i++)
cout<<a[i]<<"\t";
}
void main( )
{
Deletion d;
clrscr();
d.readdata( );
d.delet( );
d.display( );
getch( );
}
OUTPUT 1:
OUTPUT 2:
6|Page
PROGRAM 4:
class Sort
{
private:
int a[10], n, i;
public:
void readdata( );
void insertionsort( );
void display( );
};
void Sort::readdata( )
{
cout<<"Enter the size of the array:"<<endl;
cin>>n;
cout<<"Enter the elements for the array:"<<endl;
for(i=0; i<n; i++)
cin>>a[i];
}
void Sort::insertionsort( )
{
int j, temp;
for(i=1; i<n; i++)
{
j = i;
while(j >= 1)
{
if(a[j] < a[j-1])
{
temp = a[j];
a[j] = a[j-1];
a[j-1] = temp;
}
j = j-1;
}
}
7|Page
}
void Sort::display( )
{
for(i=0; i<n; i++)
cout<<a[i]<<"\t";
cout<<endl;
}
void main( )
{
Sort s;
clrscr();
s.readdata( );
cout<<"Unsorted List ....."<<endl;
cout<<"*******************"<<endl;
s.display( );
s.insertionsort( );
cout<<"Sorted List ....... "<<endl;
cout<<"*******************"<<endl;
s.display( );
getch( );
}
OUTPUT 1:
OUTPUT 2:
8|Page
PROGRAM 5:
class Search
{
private:
int a[10], n, ele, loc, beg, end, mid, i;
public:
void readdata( );
void bsearch( );
void display( );
};
void Search::readdata( )
{
cout<<"Enter the size of the array:"<<endl;
cin>>n;
cout<<"Enter the array elements in sorted order:"<<endl;
for(i=0;i<n;i++)
cin>>a[i];
cout<<"Enter the element to search:"<<endl;
cin>>ele;
}
void Search::bsearch( )
{
loc = -1; // Assume that element does not exist
beg = 0; // First element of the array
end = n-1; // Second element of the array
while(beg <= end)
{
mid = (beg+end)/2;
if(ele == a[mid]) // Element found at mid
{
loc = mid;
break;
}
else
if(ele < a[mid])
end = mid-1;
9|Page
else
beg = mid+1;
}
}
void Search::display( )
{
if(loc == -1)
cout<<ele<<" Element does not exist...!!!";
else
cout<<ele<<" Found at Location:"<<loc+1;
}
void main( )
{
Search s;
clrscr( );
s.readdata( );
s.bsearch( );
s.display( );
getch( );
}
OUTPUT 1:
OUTPUT 2:
10 | P a g e
PROGRAM 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.
#include<iostream.h>
#include<conio.h>
class SimpleInterest
{
private:
float principal,rate,time,si; //Data Members
public:
void readdata( );
void compute( ); //Member Functions Declaration
void display( );
};
void main( )
{
SimpleInterest si;
clrscr( );
si.readdata( );
si.compute( );
si.display( );
11 | P a g e
getch( );
}
OUTPUT 1:
OUTPUT 2:
12 | P a g e
PROGRAM 7:
#include<iostream.h>
#include<conio.h>
#include<math.h>
class Quadratic
{
private:
int a, b, c;
float disc, x, x1, x2;
public:
void readdata( );
void compute( );
void display( );
};
void Quadratic::readdata( )
{
cout<<"Enter the values for a, b, c (Co-efficeient)"<<endl;
cin>>a>>b>>c;
}
void Quadratic::compute( )
{
disc = b*b-4*a*c;
}
void Quadratic::display( )
{
compute( );
if(disc == 0)
{
cout<<"Equal Roots..."<<endl;
x=-b/(2*a);
cout<<"Root is. .. "<<x;
}
else if(disc>0)
{
13 | P a g e
cout<<"Real and Distinct Roots..."<<endl;
x1=(-b+sqrt(disc))/(2*a);
x2=(-b-sqrt(disc))/(2*a);
cout<<"Root 1 is "<<x1<<endl;
cout<<"Root 2 is "<<x2<<endl;
}
else
cout<<"Imaginary Roots..."<<endl;
}
void main( )
{
Quadratic q;
clrscr( );
q.readdata( );
q.display( );
getch( );
}
OUTPUT 1:
OUTPUT 2:
OUTPUT 3:
14 | P a g e
PROGRAM 8:
Write a C++ program to find the area of square/ rectangle/ triangle using
function overloading.
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
#include<math.h>
class Funcoverload
{
public:
float area(float a) //To compute area of square
{
return a*a;
}
void main()
{
float s1,s2,s3;
int choice;
Funcoverload f;
clrscr( );
while(1)
{
cout<<"Program demonstrates Function Overloaded...!!!"<<endl;
cout<<"1.To find area of square"<<endl;
cout<<"2.To find area of rectangle"<<endl;
cout<<"3.To find the area of triangle"<<endl;
cout<<"4.Exit"<<endl;
cout<<"Enter your Choice"<<endl;
cin>>choice;
15 | P a g e
switch(choice)
{
case 1: cout<<"Enter the input for square"<<endl;
cin>>s1;
cout<<"Area of Square= "<<f.area(s1)<<endl;
break;
case 2: cout<<"Enter the input for rectangle"<<endl;
cin>>s1>>s2;
cout<<"Area of Rectangle= "<<f.area(s1,s2)<<endl;
break;
case 3: cout<<"Enter the input for triangle"<<endl;
cin>>s1>>s2>>s3;
cout<<"Area of Triangle= "<<f.area(s1,s2,s3)<<endl;
break;
case 4: cout<<"End of Program .... "<<endl;
getch();
exit(1);
default:cout<<"Invallid Choice ...!!!"<<endl;
}
getch( );
}
}
OUTPUT:
16 | P a g e
PROGRAM 9:
OUTPUT 2:
17 | P a g e
PROGRAM 10:
int Series::sumseries( )
{
for(int i=1;i<=n;i++)
sum=sum+pow(x,i);
return sum;
}
void main()
{
int x,n;
clrscr( );
cout<<"Enter the value for Base(X)="<<endl;
cin>>x;
cout<<"Enter the value for Power(n)"<<endl;
18 | P a g e
cin>>n;
Series s1(x,n); // Calling Parameterized Constructor
Series s2 = s1; // Copy Constructor
cout<<"Sum of Series using Parameterised Constructor:";
cout<<s1.sumseries()<<endl;
cout<<"Sum of Series using Copy Constructor:";
cout<<s2.sumseries( );
getch( );
}
OUTPUT 1:
OUTPUT 2:
19 | P a g e
PROGRAM 11:
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.
#include<iostream.h>
#include<conio.h>
20 | P a g e
cout<<endl<<"Total Marks : "<<total;
}
};
void main( )
{
Report R; // Create an object R to process Student data
clrscr( );
R.readdata( );
R.display( );
R.readmarks( );
R.compute( );
getch( );
}
OUTPUT 1:
OUTPUT 2:
21 | P a g e
PROGRAM 12:
class Student
{
private:
long regno;
char name[20];
float fees;
public:
void readdata( );
void display( );
};
void Student::readdata( )
{
cout<<"Enter the Register Number:"<<endl;
cin>>regno;
cout<<"Enter the Student Name:"<<endl;
cin>>name;
cout<<"Enter the Fees:"<<endl;
cin>>fees;
}
void Student::display( )
{
cout<<"Register Number : "<<regno<<endl;
cout<<"Student Name : "<<name<<endl;
cout<<"Fees : "<<fees<<endl;
}
void main( )
{
Student *S; // Create a pointer to point Student object
clrscr( );
S->readdata( ); // Access Student data member using a pointer
S->display( ); // Display data using a pointer
getch( );
}
22 | P a g e
OUTPUT 1:
OUTPUT 2:
23 | P a g e
PROGRAM 13:
OUTPUT:
25 | P a g e
PROGRAM 14:
int Stack::pop()
{
int item;
if(top == -1)
cout<<"Stack Empty!!!...Can't POP"<<endl;
else
{
item = s[top];
top--;
}
return item;
}
26 | P a g e
void Stack::display( )
{
if(top == -1)
cout<<"Stack Empty!!!"<<endl;
else
{
for(int i=0; i<=top; i++)
cout<<endl<<s[i];
cout<<"-->top element"<<endl;
}
}
void main( )
{
Stack s;
int choice, ele;
clrscr( );
while(1)
{
cout<<"\n Stack Push & Pop Operation Menu"<<endl;
cout<<"1.PUSH"<<endl;
cout<<"2.POP"<<endl;
cout<<"3.DISPLAY"<<endl;
cout<<"4.EXIT"<<endl;
cout<<"Enter your Choice"<<endl;
cin>>choice;
switch(choice)
{
case 1: cout<<"Push Operation"<<endl;
cout<<"enter the value of an element"<<endl;
cin>>ele;
s.push(ele);
break;
case 2: cout<<"Pop Operation"<<endl;
cout<<"Popped Element is: "<<s.pop( );
break;
case 3: cout<<"Stack elements are:"<<endl;
s.display( );
break;
case 4: cout<<"End of the Stack Operetion"<<endl;
getch( );
exit(1);
default:cout<<"Invalid Choice...!!!"<<endl;
break;
}
getch();
}
27 | P a g e
II PUC (PCMC’s)
}
OUTPUT:
28 | P a g e
II PUC (PCMC’s)
PROGRAM 15:
int Queue::dequeue()
{
int item;
if(front == -1)
{
29 | P a g e
II PUC (PCMC’s)
cout<<"Queue is Empty... Underflow!!!"<<endl;
//getch();
//exit(1);
}
item = q[front];
if(front == rear)
{
front = -1;
rear = -1;
}
else
front++;
return item;
}
void Queue::display()
{
if(front == -1)
cout<<"Queue is Empty!!!"<<endl;
else
for(int i=front; i<=rear; i++)
cout<<q[i]<<endl;
}
void main()
{
int ele, choice;
Queue q;
clrscr( );
while(1)
{
cout<<"\nQueue Operation Menu"<<endl;
cout<<"1.Adding Element"<<endl;
cout<<"2.Deleting Element"<<endl;
cout<<"3.Display"<<endl;
cout<<"4.Exit"<<endl;
cout<<"Enter your Choice"<<endl;
cin>>choice;
switch(choice)
{
case 1: cout<<"Enter the element to be inserted"<<endl;
cin>>ele;
q.enqueue(ele);
break;
case 2: cout<<"Deleted Item = "<<q.dequeue( );
break;
30 | P a g e
II PUC (PCMC’s)
case 3: cout<<"The Queue Contents:"<<endl;
q.display( );
break;
case 4: cout<<"End of Queue Operation"<<endl;
getch();
exit(1);
default:cout<<"Invalid Choice...!!!"<<endl;
}
getch();
}
}
OUTPUT:
31 | P a g e
SECTION – B
STRUCTURED QUERY
LANGUAGE (SQL)
Structured query Language II PUC (PCMC’s)
PROGRAM 1:
Solution:
First we have to create the table EBILL using CREATE TABLE command.
32 | P a g e
Structured query Language II PUC (PCMC’s)
SQL> INSERT INTO EBILL VALUES ('EH 3041', 'SHREYA' ,'12-MAR-16',127);
3. Compute the bill amount for each customer as per the following rules.
a. MIN_AMT Rs. 50
b. First 100 units Rs 4.50/Unit
c. >100 units Rs. 5.50/Unit
COMMAND 1:
COMMAND 2:
33 | P a g e
Structured query Language II PUC (PCMC’s)
34 | P a g e
Structured query Language II PUC (PCMC’s)
PROGRAM 2:
1. Add records into the table for 10 students for Student ID, Student Name and marks in 6 subjects
using INSERT command.
2. Display the description of the fields in the table using DESC command.
3. Alter the table and calculate TOTAL and PERC_MARKS.
4. Compute the RESULT as “PASSP or “FAIL” by checking if the student has scored more than
35 marks in each subject.
5. List the contents of the table.
6. Retrieve all the records of the table.
7. Retrieve only ID_NO and S_NAME of all the students.
8. List the students who have result as “PASS”.
9. List the students who have result as “FAIL”.
10. Count the number of students who have passed.
11. Count the number of students who have failed.
12. List the students who have percentage greater than 60.
13. Sort the table according to the order of ID_NO.
Solution:
First we have to create the table CLASS using CREATE TABLE command.
1. Add records into the table for 10 students for Student ID, Student Name and marks in 6
subjects using INSERT command.
SQL> INSERT INTO CLASS VALUES (1401, 'PAWAN', 56, 36, 56, 78, 44, 67);
SQL>INSERT INTO CLASS VALUES (1411, 'RAJESH', 100,100,96,100,100,100);
35 | P a g e
Structured query Language II PUC (PCMC’s)
SQL>INSERT INTO CLASS VALUES (1412, 'KARAN', 60,30,45,45,36,49);
SQL>INSERT INTO CLASS VALUES (1403, 'SACHIN', 56,60,72,57,78,67);
SQL>INSERT INTO CLASS VALUES (1410, 'PRAKASH', 96,99,97,90,78,100);
SQL>INSERT INTO CLASS VALUES (1402, 'POOJA', 30,45,39,20,33,56);
SQL>INSERT INTO CLASS VALUES (1405, 'ASHWINI', 79,65,79,70,89,88);
SQL>INSERT INTO CLASS VALUES (1406, 'PRAJWAL', 100,90,100,89,90,100);
SQL>INSERT INTO CLASS VALUES (1404, 'BALU', 35,30,78,23,44,70);
SQL>INSERT INTO CLASS VALUES (1407, 'ESHWAR', 100,100,100,98,99,100);
2. Display the description of the fields in the table using DESC command.
4. Compute the RESULT as “PASS” or “FAIL” by checking if the student has scored more
than 35 marks in each subject.
36 | P a g e
Structured query Language II PUC (PCMC’s)
37 | P a g e
Structured query Language II PUC (PCMC’s)
12. List the students who have percentage greater than 60.
38 | P a g e
Structured query Language II PUC (PCMC’s)
PROGRAM 3:
Generate the Employee details and compute the salary based on the department.
Create the following table EMPLOYEE.
Field Name Type
EMP_ID NUMBER(4)
DEPT_ID NUMBER(2)
EMP_NAME VARCHAR2(10)
EMP_SALARY NUMBER(5)
Assume the DEPARTMENT names as Purchase (Id-01), Accounts (Id-02), Sales (Id-03), and
Apprentice (Id-04)
Enter 10 rows of data for table EMPLOYEE and 4 rows of data for DEPARTMENT table.
1. Find the names of all employees who work for the Accounts department.
2. How many employees work for Accounts department?
3. What are the Minimum, Maximum and Average salary of employees working for Accounts
department?
4. List the employees working for particular supervisor.
5. Retrieve the department names for each department where only one employee works.
6. Increase the salary of all employees in the sales department by 15%.
7. Add a new Colum to the table EMPLOYEE called BONUS NUMBER (5) and compute 5% of
the salary to the said field.
8. Delete all the rows for the employee in the Apprentice department.
Solution:
To Insert 10 records into the table EMPLOYEE using INSERT INTO command.
SQL> INSERT INTO EMPLOYEE VALUES (101, 01, 'ARUN', 15000);
SQL> INSERT INTO EMPLOYEE VALUES (104, 02, 'MOHAN', 20000);
SQL> INSERT INTO EMPLOYEE VALUES (105, 03, 'SUMAN', 22000);
39 | P a g e
Structured query Language II PUC (PCMC’s)
SQL> INSERT INTO EMPLOYEE VALUES (106, 02, 'SUSHMA', 18000);
SQL> INSERT INTO EMPLOYEE VALUES (109, 01, 'KUSHI', 22300);
SQL> INSERT INTO EMPLOYEE VALUES (110, 02, 'VIDHYA', 15000);
SQL> INSERT INTO EMPLOYEE VALUES (102, 02, 'KAVYA', 21300);
SQL> INSERT INTO EMPLOYEE VALUES (107, 03, 'AKASH', 18200);
SQL> INSERT INTO EMPLOYEE VALUES (108, 04, 'NAWAZ', 12000);
SQL> INSERT INTO EMPLOYEE VALUES (103, 02, 'DEEPAK', 24000);
To insert 4 records into the table DEAPRTMENT using the INSERT INTO command.
SQL>INSERT INTO DEPARTMENT VALUES (01, 'PURCHASE', 'KRISHNA');
SQL>INSERT INTO DEPARTMENT VALUES (02, 'ACCOUNTS', 'TANVEER');
SQL>INSERT INTO DEPARTMENT VALUES (03, 'SALES', 'SURYA');
SQL>INSERT INTO DEPARTMENT VALUES (04, 'APPRENTICE', 'HARSHA');
1. Find the names of all employees who work for the Accounts department.
3. What are the Minimum, Maximum and Average salary of employees working for
Accounts department?
40 | P a g e
Structured query Language II PUC (PCMC’s)
5. Retrieve the department names for each department where only one employee works.
7. Add a new Colum to the table EMPLOYEE called BONUS NUMBER (5) and compute
5% of the salary to the said field.
41 | P a g e
Structured query Language II PUC (PCMC’s)
8. Delete all the rows for the employee in the Apprentice department.
42 | P a g e
SECTION – C
ADVANCED HTML
Advanced HTML II PUC (PCMC’s)
PROGRAM 1:
<TR BGCOLOR=PEACHPUFF>
<TD ROWSPAN=2 ALIGN=CENTER> <B> DAY </B> </TD>
<TD COLSPAN=8 ALIGN=CENTER> <B> TIMINGS </B></TD>
</TR>
<TR BGCOLOR=RED>
<TH> 9.20 - 10.20 </TH>
<TH> 10.20 - 11.20 </TH>
<TH> 11.20 - 11.30 </TH>
<TH> 11.30 - 12.30 </TH>
<TH> 12.30 - 1.30 </TH>
<TH> 1.30 - 2.30 </TH>
<TH> 2.30 - 3.15 </TH>
<TH> 3.15 - 4.00 </TH>
</TR>
<TR>
<TD> MONDAY </TD>
<TD> MATHS </TD>
<TD> PHYSICS </TD>
43 | P a g e
Advanced HTML II PUC (PCMC’s)
<TD ROWSPAN=6 ALIGN=”CENTER”>SHORT BREAK</TD>
<TD> CHEMISTRY </TD>
<TD> COMP SCI </TD>
<TD ROWSPAN=6 ALIGN=CENTER>LUNCH BREAK</TD>
<TD COLSPAN=2ALIGN=CENTER><………COMP SCI LAB…..> </TD>
</TR>
<TR>
<TD>TUESDAY</TD>
<TD> PHYSICS </TD>
<TD> MATHS </TD>
<TD> CHEMISTRY </TD>
<TD> ENGLISH </TD>
<TD COLSPAN=2 ALIGN=CENTER><………PHYSICS LAB……></TD>
</TR>
<TR>
<TD> WEDNESDAY </TD>
<TD> COMP SCI </TD>
<TD> PHYSICS </TD>
<TD> MATHS </TD>
<TD> KANNADA </TD>
<TD COLSPAN=2 ALIGN=CENTER><……CHEMISTRY LAB….></TD>
</TR>
<TR>
<TD> THRUSDAY </TD>
<TD> MATHS </TD>
<TD> KANNADA </TD>
<TD> PHYSICS </TD>
<TD> ENGLISH </TD>
<TD COLSPAN=2 ALIGN=CENTER><………COMP SCI LAB…..> </TD>
</TR>
<TR>
<TD>FRIDAY </TD>
<TD>ENGLISH </TD>
<TD>MATHS </TD>
<TD>PHYSICS </TD>
44 | P a g e
Advanced HTML II PUC (PCMC’s)
<TD>COMP SCI </TD>
<TD>CHEMISTRY </TD>
<TD>KANNADA </TD>
</TR>
<TR>
<TD> SATURDAY </TD>
<TD> MATHS </TD>
<TD> ENGLISH </TD>
<TD> CHEMISTRY </TD>
<TD> COMP SCI </TD>
<TD COLSPAN=2 ALIGN=CENTER><……SPECIAL CLASS…..> </TD>
</TR>
</TABLE>
</CENTER>
</BODY>
</HTML>
OUTPUT:
45 | P a g e
Advanced HTML II PUC (PCMC’s)
PROGRAM 2:
<BODY>
<FORM NAME=”APPFORMPUC” METHOD=”POST” ACTION=”IPUC_SEND.PHP>
<H3 ALIGN=CENTER> FIRST PUC APPLICATION FORM </H3>
<TABLE CELLSPACING=5 CELLPADDING=5% ALIGN=CENTER>
<TR>
<TD ALIGN=LEFT>STUDENT NAME: </TD>
<TD><INPUT TYPE=”TEXT” NAME=”STUNAME”></TD>
</TR>
<TR>
<TD ALIGN=LEFT>FATHER NAME: </TD>
<TD><INPUT TYPE=”TEXT” NAME=”FATNAME”></TD>
</TR>
<TR>
<TD ALIGN=LEFT>FATHER OCCUPATION: </TD>
<TD><INPUT TYPE=”TEXT” NAME=”FATOCC”></TD>
</TR>
<TR>
<TD ALIGN=LEFT>DATE OF BIRTH: </TD>
<TD><INPUT TYPE=”TEXT” NAME=”DOB”></TD>
</TR>
<TR>
<TD ALIGN=LEFT>CONTACT NUMBER: </TD>
<TD><INPUT TYPE=”TEXT” NAME=”CONTACT”></TD>
</TR>
<TR>
<TD ALIGN=LEFT> EMAIL ID: </TD>
<TD><INPUT TYPE=”TEXT” NAME=”EMAIL”></TD>
</TR>
<TR>
<TD ALIGN=LEFT>UPLOAD PHOTO: </TD>
<TD><INPUT TYPE=FILE NAME=”PHOTO”></TD>
</TR>
<TR>
<TD ALIGN=LEFT>GENDER: </TD>
<TD><INPUT TYPE=RADIO NAME=GEN VALUE=”M”>MALE
<INPUT TYPE=RADIO NAME=GEN VALUE=”F”>FEMALE</TD>
</TR>
46 | P a g e
Advanced HTML II PUC (PCMC’s)
<TR>
<TD ALGIN=LEFT> CATEGORY:</TD>
<TD ALGIN=LEFT><INPUT TYPE=”TEXT” NAME=”CATEGORY”>
<SELECT NAME=”DROPDOWN” >
<OPTION VALUE=1>GM</OPTION>
<OPTION VALUE=2>SC</OPTION>
<OPTION VALUE=3>ST</OPTION>
<OPTION VALUE=4>C1</OPTION>
<OPTION VALUE=5>2A</OPTION>
<OPTION VALUE=6>2B</OPTION>
<OPTION VALUE=7>3A</OPTION>
<OPTION VALUE=8>3B</OPTION>
</SELECT>
</TD>
</TR>
<TR>
<TD ALIGN=LEFT>Indicate the Board PASSED: </TD>
<TD ALGIN=LEFT><INPUT TYPE=”TEXT” NAME=”QUALIFICATION” >
<SELECT NAME=”DROPDOWN” SIZE=4 ID=QUALI>
<OPTION VALUE=1>SSLC</OPTION>
<OPTION VALUE=2>CBSE</OPTION>
<OPTION VALUE=3>ICSE</OPTION>
<OPTION VALUE=4>OTHER STATE</OPTION>
</SELECT>
</TD>
</TR>
<TR>
<TD ALGIN=LEFT> STUDENT ADDRESS :</TD>
<TD> <TEXTAREA ROWS=2 COLS=15 NAME=ADD></TEXTAREA>
<P> Enter the Contact Address with Pin Code </P>
</TD>
</TR>
<TR>
<TD ALGIN=LEFT>SUBJECT CHOOSEN: </TD>
<TD ALGIN=LEFT>
<INPUT TYPE=CHECKBOX NAME=LANG1 >KANNADA
<INPUT TYPE=CHECKBOX NAME=LANG2 >ENGLISH
<INPUT TYPE=CHECKBOX NAME=SUB1 >PHYSICS
<INPUT TYPE=CHECKBOX NAME=SUB2 >CHEMISTRY
<INPUT TYPE=CHECKBOX NAME=SUB3 >MATHS
<INPUT TYPE=CHECKBOX NAME=SUB4 >BIOLOGY
<INPUT TYPE=CHECKBOX NAME=SUB5 >COMP SCI
<INPUT TYPE=CHECKBOX NAME=SUB56>ELECTRONICS
</TD>
</TR>
47 | P a g e
Advanced HTML II PUC (PCMC’s)
<TR>
<TD><INPUT TYPE="SUBMIT" VALUE="SUBMIT THE FORM"> </TD>
<TD><INPUT TYPE="RESET" VALUE="RESET THE FORM"></TD>
</TR>
</TABLE>
<FORM>
</BODY>
</HTML>
OUTPUT:
48 | P a g e