BCE BT-205 Lab Manual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Experiment # 1

AIM: Study and practice of Internal & External DOS commands.

THEORY:
In DOS systems, the internal commands reside in COMMAND.COM, which loads into memory when the
computer system is started; these commands do not reside on disk. The external commands are files
that do reside on disk and have an extension of .COM, .EXE, or .BAT. Both command types are executed
from the MS-DOS prompt.

Internal Commands: External Commands:


CHDIR(CD) Ping
CLS Arp
DATE Chkdsk
DEL(ERASE) FTP
DIR Help
EXIT Hostname
MKDIR(MD) Ipconfig
REM logoff
RENAME(REN) Power
RMDIR(RD) Print
TIME Reg
VER Shutdown

OUTPUT:
Internal Commands: External Commands:
CHDIR(CD) Systeminfo
cd d: systeminfo
Changes current directory to D Directory. The above command would display information about
the computer and the operating system, including
networking information, and installed hotfixes.
CLS Arp
cls arp -a
Running the cls command at the command prompt Interface 220.0.0.80
would clear your screen of all previous text and only Internet Address Physical Address Type
return the prompt.
220.0.0.160 00-50-04-62-F7-23 static
DATE Chkdsk
date chkdsk
Display the current date and prompt for a new one. If no Will display all information described above and also
date is entered, the current date will be kept. report any crossed linked files.
DEL(ERASE) Mem
del c:\windows\test.tmp mem
Delete the c:\windows\test.tmp in the windows directory 655360 bytes total conventional memory
if it exists. 655360 bytes available to MS-DOS
633296 largest executable program size
1048576 bytes total contiguous extended memory
0 bytes available contiguous extended memory
941056 bytes available XMS memory
MS-DOS resident in High Memory Area
DIR Help
dir HELP [command]
Lists all files and directories in the directory that you are command - displays help information on that command.
currently in.
EXIT Hostname
exit hostname
it returns to the windows desktop and quits from the Running the command would display the hostname for
command prompt. the computer.
MKDIR(MD) Ipconfig
md test ipconfig
The above example creates the "test" directory in the Ethernet adapter Local Area Connection:
directory you are currently in.
Connection-specific DNS Suffix . : hsd1.ut.comcast.net.
IP Address. . . . . . . . . . . . : 192.168.201.245
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.201.1
Vol logoff
vol c: logoff
Display the volume of drive c: as shown in the below Would immediately log off the profile currently logged
example. into Windows.
Volume in drive C has no label.
Volume Serial Number is 1C24-AB20
RENAME(REN) Power
rename c:\chope hope power std
Rename the directory chope to hope. Monitors hardware devices and then chooses the best
power procedure for each.
RMDIR(RD) Print
rmdir c:\test print c:\file.txt /c /d:lpt1
Remove the test directory, if empty. Prints the file file.txt to the parallel port lpt1.
TIME Scandisk
Time scandisk c: /autofix
Displays the system time. Scandisk the main hard disk drive for any errors and if
found automatically fix those errors.
VER Shutdown
ver shutdown -s
Display what version of MS-DOS or Windows This would display a Windows System Shutdown
command prompt you're using. Below is an example of window for 30 seconds, warning the user that the
what this may look like. computer is going to shutdown.
Microsoft Windows XP [Version 5.1.2600]
Experiment # 2
AIM: Study and Practice of MS windows – Folder related operations, My-Computer, window explorer,
Control Panel.

THEORY:
Folders
In Windows, the files, folders, and subfolders are represented by small pictures called icons. The icon for
folders and subfolders intuitively looks like a folder.
Every Windows folder provides easy access to common file and folder management tasks. When you
open any folder on your computer, a list of hyperlinked tasks is displayed next to the folder contents.
You can select a file or folder, and then click a task to rename, copy, move, or delete it.
Folder related operations
• Create • Move
• Delete • Modify
• Rename • Customize
• Copy

My Computer
In Windows, you can locate and manage your files and directories (folders) in either My Computer or
Explorer. My Computer is most convenient for viewing one directory or window at a time; Explorer is
your best choice when you want to view or reorganize files in different parts of your computer.

In My Computer, you choose a drive, and by default, view icons or a list of folders and files in that drive.
Your view is one window at a time, unless you choose explore in My Computer to move to Explorer,
which makes it easy to work in a particular folder, but difficult to move between folders.

When you open a folder in My Computer, a new window opens; when you open a folder within that
window, another window opens. Soon your screen is cluttered with windows, unless you initially
choose, in view, options to use a single window.

Windows Explorer
Windows Explorer is an application that provides detailed information about your files, folders, and
drives. You can use it to see how your files are organized and to copy, move, and rename files, as well as
perform other tasks pertaining to files, folders, and drives.
The simplest way to access Windows Explorer is to right-click the Start menu or the My Computer icon
and selects Explore. If your keyboard has a Windows logo key, you can press Win-e to launch Windows
Explorer. Alternatively, you can access it from the Start menu. In newer operating systems, it is under
Accessories.

Control Panel
Control Panel is full of specialized tools that are used to change the way Windows looks and behaves.
Some of these tools help you adjust settings that make your computer more fun to use. For example,
use Mouse to replace standard mouse pointers with animated icons that move on your screen, or use
Sounds and Audio Devices to replace standard system sounds with sounds you choose. Other tools help
you set up Windows so that your computer is easier to use. For example, if you are left-handed, you can
use Mouse to switch the mouse buttons so that the button on the right performs the primary functions
of selecting and dragging.
To open Control Panel, click Start and then click Control Panel. If your computer is set up in Classic view
using the more familiar Start menu, click Start, point to Settings, and then click Control Panel.

Experiment # 3
AIM: Study and practice of Basic linux Commands – ls, cp, mv, rm, chmod, kill, ps etc.

THEORY: Linux  Linux is an operating system that was initially created as a hobby by a young student,
Linus Torvalds, at the University of Helsinki in Finland. Linus had an interest in Minix, a small UNIX
system, and decided to develop a system that exceeded the Minix standards. He began his work in 1991
when he released version 0.02 and worked steadily until 1994 when version 1.0 of the Linux Kernel was
released. The kernel, at the heart of all Linux systems, is developed and released under the GNU General
Public License and its source code is freely available to everyone. It is this kernel that forms the base
around which a Linux operating system is developed.

OUTPUT:
Command Example Description
cd Change directory
Change the current working directory to /home. The '/' indicates
cd /home relative to root, and no matter what directory you are in when you
execute this command, the directory will be changed to "/home".
Change the current working directory to httpd, relative to the
cd httpd current location which is "/home". The full path of the new working
directory is "/home/httpd".
Move to the parent directory of the current directory. This command
cd ..
will make the current working directory "/home.
Move to the user's home directory which is "/home/username". The
cd ~
'~' indicates the users home directory.
cp Copy files
Copy the files "myfile" to the file "yourfile" in the current working
cp myfile yourfile directory. This command will create the file "yourfile" if it doesn't
exist. It will normally overwrite it without warning if it exists.
With the "-i" option, if the file "yourfile" exists, you will be prompted
cp -i myfile yourfile
before it is overwritten.
Copy the file "/data/myfile" to the current working directory and
cp -i /data/myfile .
name it "myfile". Prompt before overwriting the file.
Copy all files from the directory "srcdir" to the directory "destdir"
preserving links (-p option), file attributes (-p option), and copy
cp -dpr srcdir destdir
recursively (-r option). With these options, a directory and all it
contents can be copied to another directory.
logout Logs the current user off the system.
ls List files
List files in the current working directory except those starting with .
ls
and only show the file name.
List all files in the current working directory in long listing format
ls -al
showing permissions, ownership, size, and time and date stamp
mv Move or rename files

Move the file from "myfile" to "yourfile". This effectively changes the
mv -i myfile yourfile
name of "myfile" to "yourfile".

Move the file from "myfile" from the directory "/data" to the current
mv -i /data/myfile .
working directory.

pwd Show the name of the current working directory

Lists the contents of the "/etc/profile" file to the screen one page at
more /etc/profile
a time.

shutdown Shuts the system down.

shutdown -h now Shuts the system down to halt immediately.

shutdown -r now Shuts the system down immediately and the system reboots.

rm This command is used to remove or delete files and directories

rm directory2 This will delete the directory - directory2

chmod change file access permissions

chmod u+x file Add execute-by-user permission to file:


Either of them will assign read/write/execute permission by owner
chmod 751 file
(7), read/execute permission by group (5), and execute-only
chmod u=rwx,g=rx,o=x file
permission by others (1) to file
chmod =r file
chmod 444 file Any one of them will assign read-only permission to file for everyone:
chmod a-wx,a+r file
This makes the executable setuid, assigns read/write/execute
chmod 4755 file
permission by owner, and assigns read/execute permission by group
and others
Typing ps alone would list the current running processes. Below is an
example of the output that would be generated by the ps command.
PID TTY TIME CMD
ps ps
6874 pts/9 0:00 ksh
6877 pts/9 0:01 csh
418 pts/9 0:00 csh
Display full information about each of the processes currently
running.
ps -ef UID PID PPID C STIME TTY TIME CMD
hope 29197 18961 0 Sep27 ? 00:00:06 sshd: hope@pts/87
hope 32097 29197 0 Sep27 pts/87 00:00:00 -csh
hope 7209 32097 0 12:17 pts/87 00:00:00 ps -ef
Displays processes including those that are in a wait state, similar to
the below example.
ps -l F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD 0 T 0
12308 29722 0 80 0 - 16136 finish pts/0 00:00:00 pico 0 R 0 12530
29722 0 80 0 - 15884 - pts/0 00:00:00 ps 4 S 0 29722 29581 0 80 0 -
16525 wait pts/0 00:00:00 bash
kill kill [-s] [-l] %pid kill command is used to kill the background process.
Specify the signal to send. The signal may be given as a signal
-s
name or number.
Write all values of signal supported by the implementation, if
-l
no operand is given.
-pid Process id or job id.
-9 Force to kill a process.
Experiment # 4

AIM: Creation and editing of Text files using MS- word.

THEORY:
MS-Word: Microsoft Word is a word processing software package. You can use it to type letters,
reports, and other documents. This lesson introduces you to the Word window. You use the Word
window to interact with Microsoft Word.

Getting Started
Open Microsoft Word by clicking on Start > All Programs and selecting Microsoft Word from the list.
Word will open with a blank document. You will see the flashing cursor at the top left corner of the
page, ready for you to start typing.
If you hold your mouse over any of the icons in the menu bars or toolbars, you will see a quick
description of what those buttons do.
If you can't see any of the toolbars mentioned in this article (mainly the Standard and Formatting
toolbars), you may have to instruct Word to show them by clicking View then Toolbars and putting a tick
by any toolbars you want to show.

TASK: Create a MS-Word .doc file contain yours complete biodata.

Experiment # 5

AIM: Creation and operating of spreadsheet using MS-Excel.

THEORY:
MS-Excel: Microsoft Excel is an electronic spreadsheet that runs on a personal computer. You can use it
to organize your data into rows and columns. You can also use it to perform mathematical calculations
quickly. This tutorial teaches Microsoft Excel basics. Although knowledge of how to navigate in a
Windows environment is helpful, this tutorial was created for the computer novice. This lesson will
introduce you to the Excel window. You use the window to interact with Excel.

Getting Started
• Click on the Start button, point to Programs, and following by Microsoft Office and click on
Microsoft Office Excel 2003.

TASK: Create a MS-Excel .xls file contain mark sheet of 10th and 12th Standards.
Experiment # 6

AIM: Creation and editing power-point slides using MS- power point.

THEORY:
MS-Power Point:
PowerPoint is a presentation software package. With PowerPoint, you can easily create slide shows.
Trainers and other presenters use slide shows to illustrate their presentations. This tutorial teaches
PowerPoint basics. This lesson introduces you to the PowerPoint window. You use the window to
interact with PowerPoint.
Microsoft PowerPoint 2003 is a program designed to create and use a presentation. This Guide will take
you through getting started and building your confidence in the skills needed to use the software
productively
Getting Started
To start PowerPoint, go to the Start menu and select Programs ->Microsoft Office ->Power Point.

TASK: Create a MS-Power Point Presentation .ppt file Covers the topic “Computer Organization”.

Experiment # 7

AIM: Creation and manipulation of database table using SQL in MS-Access.

THEORY:
MS-Access:
Microsoft Access 2003 is a powerful, yet easy to learn, relational database application for Microsoft
Windows. It introduces fundamental database concepts and operations and illustrates how they are
performed in Microsoft Access 2003.
Access is a pseudo-relational database management system from Microsoft that combines the relational
Microsoft Jet Database Engine with a graphical user interface and software-development tools. It is a
member of the Microsoft Office suite of applications

Getting Started
• Click the Windows Start button, located in the bottom-left corner of the screen.
• Use the mouse to move the pointer over the words All Programs.
• A menu pops up to the right of All Programs. The programs and menus you see listed depend on
the programs installed on your computer, so your menu will probably look somewhat different
from other users' menus.
• On the All Programs menu, move the pointer over the words Microsoft Office 2003, then point
to and click Microsoft Office Access 2003.
TASK: Create a MS-Access database .mdb file to store the results of students.

Student Marks
Fields Class Date of Birth Division Rank
Name Obtained
Type Text Number Date/Time Number Number Number

Experiment # 8
AIM: WAP to illustrate Arithmetic expressions. (Implement the addition, multiplication, subtraction and
division).

CODE:
#include<iostream.h> cout<<"\n\nMUL = "<<c;
#include<conio.h> }
#include<process.h> void div()
{
class arithmetic double a, b, c;
{ cout<<"DIVISION OF TWO NUMBERS";
public: cout<<"\n\n\nEnter The Number#1 :: ";
void add() cin>>a;
{ cout<<"\nEnter the Number#2 :: ";
double a, b, c; cin>>b;
cout<<"ADDITION OF TWO NUMBERS"; c=a/b;
cout<<"\n\n\nEnter The Number#1 :: "; cout<<"\n\nQNT = "<<c;
cin>>a; }
cout<<"\nEnter the Number#2 :: "; };
cin>>b;
c=a+b; void main()
cout<<"\n\nSUM = "<<c; {
} a:
void sub() clrscr();
{ int i;
double a, b, c; cout<<"\n*************************";
cout<<"SUBSTRACTION OF TWO NUMBERS"; cout<<"\n*****Enter The Value*****";
cout<<"\n\n\nEnter The Number#1 :: "; cout<<"\n*************************";
cin>>a; cout<<"\n\n\t1 --> Addition";
cout<<"\nEnter the Number#2 :: "; cout<<"\n\t2 --> Subtraction";
cin>>b; cout<<"\n\t3 --> Multiplication";
c=a-b; cout<<"\n\t4 --> Division";
cout<<"\n\nSUB = "<<c; cout<<"\n\t0 --> Exit";
} cout<<"\n\n\tValue = ";
void mul() cin>>i;
{ clrscr();
double a, b, c; arithmetic obj;
cout<<"MULTIPLICATION OF TWO NUMBERS";
cout<<"\n\n\nEnter The Number#1 :: "; switch(i)
cin>>a; {
cout<<"\nEnter the Number#2 :: "; case 0 : exit(0);
cin>>b;
c=a*b; case 1 : obj.add();
break; break;
case 2 : obj.sub(); default : break;
break; }
case 3 : obj.mul(); getch();
break; goto a;
case 4 : obj.div(); }

Experiment # 9
AIM: WAP to illustrate Arrays. (Implement the addition of array elements).

CODE:
#include<iostream.h>
#include<conio.h>

void main()
{
int index, a[10];
int sum=0;
for(index=0;index<10;index++)
{
cout<<”Enter The “<<i<<”th Element = “;
cin>>a[i];
sum = sum + a[i];
}
cout<<endl<<”\n\n\n”;
cout<<”SUM of ARRAY = “<<sum;
}

Experiment # 10
AIM: WAP to illustrate functions. (Implement the table generator).

CODE:
#include<iostream.h>
#include<conio.h>

void table(int i);

void main()
{
int a;
cout<<”Enter The Number For The Table= ”;
cin>>a;
table(a);
getch();
}

void table(int i)
{
int number, index, temp;
number = i;
for (index=1; index<=10; i++)
{
temp = index * number;
cout<<”number * “<<index<<” = “<<temp<<endl;
}
}

Experiment # 11
AIM: WAP to illustrate constructor & Destructor. (Display the working of constructor and destructor).

CODE:
#include<iostream.h>
#include<conio.h>

class mycpp
{
public:
mycpp()
{
cout<<”THIS IS THE CONSTRUCTOR FUNCTION CALL.”;
}
void add(int I, int j)
{
int k = i + j;
cout<<”SUM = “<<k;
}
~mycpp()
{
cout<<”THIS IS THE DESTRUCTOR FUNCTION CALL.”;
}
};

Void main()
{
myclass obj;
obj.add(5,6) ;
getch();
}

You might also like