0% found this document useful (0 votes)
4 views

Computer Science 330 P 2025 E

The document outlines a series of practical exercises for Class 12 students, focusing on creating email accounts, writing C++ programs, and developing HTML web pages. Each practical includes objectives, required software, prerequisites, procedures, and dos and don'ts for successful completion. The exercises cover various programming concepts such as data types, conditional statements, loops, arrays, and HTML tags.

Uploaded by

sugyansil.2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Computer Science 330 P 2025 E

The document outlines a series of practical exercises for Class 12 students, focusing on creating email accounts, writing C++ programs, and developing HTML web pages. Each practical includes objectives, required software, prerequisites, procedures, and dos and don'ts for successful completion. The exercises cover various programming concepts such as data types, conditional statements, loops, arrays, and HTML tags.

Uploaded by

sugyansil.2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Practical File

th
Class-12

Medium English
Practical-1
Create e-mail account on Gmail/Yahoo mail/Hotmail.
Objective:- After completion of this practical we will be able to create your
personal e-mail account.

Software required:- Internet Explorer / Mozila /Google Chrome (any


browser).

Pre-requisite :-
we should be able to use Computer/Laptop.
we should have the knowledge of internet.

Procedure
Make sure our computer is “On” and Internet service is enabled there.
Open any web browser (i.e., Internet Explorer, Mozila, Google Chrome,
etc.).
Type URL www.gmail.com (for gmail account).

Click on sign up button.


Fill in the registration form.
Read the terms and conditions then accept it.
Submit the filled form.
Now our account is created and we can use it for communication.
Dos and Don’ts
Choose username that could relate to our name.
Do not use very simple password.

Observations
Gmail is one of the most used email services around the world. If we want
to create a Gmail account in just a few simple steps we can create it. But
before that, we need to sign up for a Google account. To create a Gmail
account we need to provide some basic information like our name, birth
date, gender, and location. Even we have to choose a name for our new
Gmail address. Create our own Gmail account with the quick sign-up
process.
Practical-2
Write a C++ program to accept two numbers, a float and an integer and
display the following:-
a) Sum of two numbers in integer form.
b) Sum of two numbers in float form.

Objective :- After completion of this practical you will be able to use basic
data types, operators and type conversion in C++.

Software required :- Turbo C++

Pre-requisite :- Learner should have the basic knowledge of characters,


tokens, basic data types, input output streams and type conversion.

Procedure
Accept two numbers using input stream.
Add two numbers using arithmetic operators.
Display the numbers in integer and float form using output stream.

a) Sum of two numbers in integer form.


input
#include <iostream>
using namespace std;
int main(){
//Declaring two integer variables
int num1, num2;
/* cout displays the string provided in the
* double quotes as it is on the screen
*/
cout<<"Enter first integer number: ";
/* cin is used to capture the user input
* and assign it to the variable.
*/
cin>>num1;
cout<<"Enter second integer number: ";
cin>>num2;
cout<<"Sum of entered numbers is: "<<(num1+num2);
return 0;
}
Output:
Enter first integer number: 10
Enter second integer number: 20
Sum of entered numbers is: 30

b) Sum of two numbers in float form.


input

Dos and Don’ts


Add your name and enrolment number as a comment on the top of the
program.
Save the program with proper filename having .cpp extension.
Create a folder and store all the programs in the folder.
Practical-3
Write a C++ program to accept a character. Print whether the
character is an alphabet, digit, or a special character. Display
appropriate messages.

Objective
After completion of this practical you will be able to use
conditional statements like:-
if ….. else
if …… elseif…else

Software required
Turbo C++

Pre-requisite:- Learner should have the basic knowledge of


writing a C++ program and also know about compound, null and
conditional statements.

Procedure
Accept a character from the user.
Use if … else statement for finding the character is
alphabet, digit, or a special character.
Syntax of if statement
if(condition)
{ code when true }
else
{ code when not true }
Display the result.

Dos and Don’ts


Add your name and enrolment number as a comment on the
top of the program.
Save the program with proper filename having .cpp
extension.
Create a folder and store all the programs in the folder.

Observations
input
#include<iostream>
using namespace std;
int main()
{
char ch;
cout << "Enter any character";
cin >> ch;
// Alphabet checking condition
if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
{
cout << ch << " is an Alphabet";
}
else if(ch >= '0' && ch <= '9')
{
cout << ch << " is a Digit";
}
else
{
cout << ch << " is a Special Character";
}
return 0;
}
OUTPUT
Practical-4
Write a C++ program to accept a number and display the
corresponding number of week day E.g., If the user enters “1”
display “ Monday”, if the user enters “2” display “ Tuesday”……
and so on.

Objective :- After completion of this practical we will be able to


use conditional statement, switch…… case.

Software required
Turbo C++
Pre-requisite
Learner should have the basic knowledge of a C++ program
and know about switch … case construct.

Procedure
Accept a number from the input stream.
Use switch case statement like
Syntax
switch (variable)
{
case 1: statement1 ; break;
case 2: statement 2 ; break;
case 3:statement 3; break;
.
.
.
default: default statement break;
}
Display the result.

FOR EXAMPLE:-
input

Output

Dos and Don’ts


Add your name and enrolment number as a comment on the top of the
program.
Save the program with proper filename having .cpp extension.
Create a folder and store all the programs in the folder.
Use your own logic building skills to develop the program.
Display appropriate messages.
Practical-5
Write a program using do..while loop to display the Fibonacci series 0, 1,
1, 2, 3, 5… n

Objective
After completion of this practical you will be able to use do …… while
statement.

Software required
Turbo C++ Pre-requisite
Learner should have the basic knowledge of working of conditional
and looping statements. Procedure
Use do.. while loop in the program.
Use logic for displaying Fibonacci series 0,1,1,2,3,5,8….
Syntax
do
{
Body of the loop
Increment / decrement statements
}while(test-expression);
Display fibonacci series.
Dos and Don’ts
Add your name and enrolment number as a comment on the top of the
program.
Save the program with proper filename having .cpp extension.
Create a folder and store all the programs in the folder.
Use your own logic building skills to develop the program.
Practical-6
Write a C++ program to accept eight numbers in an array. Sort the
numbers in ascending order using Bubble sort method. Also insert a number
in the sorted array.

Objective:- After completion of this practical you will be able to sort array in
ascending or descending order.

Software required
Turbo C++ Pre-requisite
Basic knowledge of arrays and its elements, their working and sorting
technique logic (Bubble Sort) is required.

Procedure
Accept 8 numbers in an array.
Sort the numbers in ascending order using Bubble sort method.
Print the sorted list.
Accept a new number.
Insert the number in the appropriate position in the sorted list.
Display all the nine numbers of the array.

EXAMPLE
Input:-
#include<iostream>
using namespace std;
int main()
{
int num, i, arr[50], j, temp;
cout<<"\n Enter Total Number of Elements : ";
cin>>num;
cout<<"\n Enter "<<num<<" Elements : \n\n";
for(i=0; i<num; i++)
{
cout<<" ";
cin>>arr[i];
}
cout<<"\n\n Sorting Array using Bubble Sort... \n";
for(i=0; i<(num-1); i++)
{
for(j=0; j<(num-i-1); j++)
{
if(arr[j]>arr[j+1])
{
temp=arr[j];
arr[j]=arr[j+1];
arr[j+1]=temp;
}
}
}
cout<<"\n Sorted Element in Ascending Order : \n";
for(i=0; i<num; i++)
{
cout<<" ";
cout<<arr[i]<<" ";
}
return 0;
}

Dos and Don’ts


Add your name and enrolment number as a comment on the top of the
program.
Save the program with proper filename having .cpp extension.
Create a folder and store all the programs in the folder.
Use your own logic building skills to develop the program.
Practical-7
Write a C++ program to accept two arrays and merge them to form a new array
such that the new array contains the elements from both the arrays alternatively.

Objective
After completion of this practical you will be able to merge two or more arrays
according to the given conditions.

Software required
Turbo C++

Pre-requisite
Basic knowledge of working with arrays and assigning the values of one
array to another is required.

Procedure
To accept the elements of two arrays, say A and B of any size.
Create a new array C such that the elements of array A and array B are
alternatively placed in array C.
For example
Array A contains 1,2,3,4,5,6
Array B contains 7,8,9,10,11,12
Then array C should contain 1,7,2,8,3,9,4,10,5,11,6,12
FOR EXAMPLE
INPUT:-
Dos and Don’ts
Add your name and enrolment number as a comment on the top of the
program.
Save the program with proper filename having .cpp extension.
Create a folder and store all the programs in the folder.
Use your own logic building skills to develop the program.
Practical-8
Objective
After completion of this practical you will be able to use user defined data
type structures.

Software required
Turbo C++

Pre-requisite
Knowledge of creating and accessing the members of the structure is
required.

Procedure
Create a structure prototype as follows:
struct Employment_Exchange
{
int application_no;
……
…….
};
Creating the instance of a structure
Structure name variable name;
For example,
Employment_Exchange E1;
Accessing of data members ( using dot operator)
Structure_variablename.member_name ;
For example,
E1.application_no=10;

FOR EXAMPLE:-
INPUT:-
// C++ program to store data of an employee in a structure variable
#include <iostream>
using namespace std;

struct Employee {
char name[50];
int salary;
int employeeCode;
char dept[5];
};
int main() {
Employee e;

cout << "Enter name of employee : ";


cin.getline(e.name, 50);
cout << "Enter department : ";
cin.getline(e.dept, 5);
cout << "Enter salary of employee : ";
cin >> e.salary;
cout << "Enter employee code : ";
cin >> e.employeeCode;

// Printing employee details


cout << "\n*** Employee Details ***" << endl;
cout << "Name : " << e.name << endl << "Salary : " << e.salary << endl;
cout << "Employee Code : " << e.employeeCode << endl << "Department :
" << e.dept;
return 0;
}

Dos and don’ts


Add your name and enrolment number as a comment on the top of the
program
Save the program with proper filename having .cpp extension
Create a folder and store all the programs in the folder.
Use your own logic building skills to develop the program.
Pre-requisite
Basic knowledge of OOP, defining classes, declaring objects and
accessing public members is required.
Procedure
Create a class called Competition containing public and private
members as given in the problem statement.
Use the following syntax.
class classname
{
private:
variable declaration;
function declaration;
public:
variable declaration;
function declaration;
};

Dos and Don’ts


Add your name and enrolment number as a comment on the top of the
program.
Save the program with proper filename having .cpp extension.
Create a folder and store all the programs in the folder.
Use your own logic building skills to develop the program.

Observations
Practical-9
Write a C++ program to reverse a number using
pointers.
Objective
After completion of this practical you will be able to use
pointers.

Software required
Turbo C++

Pre-requisite
Basic knowledge of pointers is required.

Procedure
Accept a number.
Create a pointer using * operator and assign the
address using & operator.
Use a pointer to access the number.
Use % and / operators to separate the digits.
Display the reverse number
For example, if the number is 1234, output should be
4321

Dos and Don’ts


Add your name and enrolment number as a comment
on the top of the program.
Save the program with proper filename having .cpp
extension.
Create a folder and store all the programs in the
folder.

Observations
Practical-10
Create an HTML document which will display the ordered list of practical
mentioned in this manual.

Objective
After completion of this practical you will be able to create ordered list of
items.

Software required
Notepad.
Internet Explorer / Google Chrome/ Mozilla Firefox or any other
browser software.

Pre-requisite
Theoretical knowledge of HTML tags.

Procedure
Open Notepad.
Use <OL> tag, type the list of practical.
Save it as home.html.

Dos and Don’ts


Remember to save your file and the location where you are saving the file.
INPUT

DISPLAY
Practical-11
Create a web page that displays title “HELLO WORLD”
and content “Delhi is the capital of India” in Italic and
bold.

Objective
After completion of this practical you will be able to use
title, italic and bold tags.

Software required
Notepad.
Internet Explorer / Google Chrome/ Mozilla Firefox or
any other browser software.

Pre-requisite
Theoretical knowledge of HTML tags.

Procedure
Open Notepad.
Use following tags
a. <title> …….... </title>
b. <i>…….. </i>
c. <b>……..</b>

Dos and Don’ts


Remember to save your file and the location where you
are saving the file.
INPUT

DISPLAY
Practical-12
Create a web page that contains the following table:
Roll Name Marks
111 aaaa 77
222 accc 66
333 beee 99

Objective
After completion of this practical you will be able to create table in
webpage.
Software required
Notepad
Internet Explorer / Google Chrome/ Mozilla Firefox or any other
browser software
Pre-requisite
Theoretical knowledge of HTML tags.
Procedure
Open Notepad.
Use <tr> tag for rows.
Use <td> tag for columns.
Dos and Don’ts
Remember to save your file and the location where you are saving the
file.

INPUT
OUTPUT
Practical-13
Add an image on existing web page.

Objective
After completion of this practical you will be able to add image in
your webpage.

Software required
Notepad.
Internet Explorer / Google Chrome/ Mozilla Firefox or any other
browser software.

Pre-requisite
Theoretical knowledge of HTML tags.

Procedure
Open Notepad.
Use following tags

<img
src="https://www.floraqueen.com/blog/wpcontent/uploads/2020/02/shutterstock_552296878.jpg">

If image is stored at different place, give complete path of image location


after src.
Dos and Don’ts
Remember to save your image file and the location where you are saving
the file.
INPUT

DISPLAY

You might also like