Computer Science 330 P 2025 E
Computer Science 330 P 2025 E
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.
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).
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++.
Procedure
Accept two numbers using input stream.
Add two numbers using arithmetic operators.
Display the numbers in integer and float form using output stream.
Objective
After completion of this practical you will be able to use
conditional statements like:-
if ….. else
if …… elseif…else
Software required
Turbo C++
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.
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.
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
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;
}
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;
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
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.
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>
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">
DISPLAY